1 """
2 Welcome to the Mari Python API documentation.
3
4 If you are new to Python, you should definitely check out the on-line tutorial:
5 - U{http://docs.python.org/release/2.7.3/tutorial/index.html}
6
7 Mari's Python console works in a very similar way to a standard Python interpreter. For more
8 details, please see "Python S{rarr} Readme" on the menu in Mari.
9
10
11 Mari Python Quick Start
12 =======================
13
14 If you understand the basics of Python and want to try using it to get Mari to do something, here
15 are some examples of how to perform some common tasks.
16
17 - To open a project:
18
19 C{L{mari.projects.open<ProjectManager.open>}('your_project_name')}
20
21 - To get a list of the available projects:
22
23 C{L{mari.projects.list<ProjectManager.list>}()}
24
25 - To get the currently selected geometry object:
26
27 C{L{mari.geo.current<GeoManager.current>}()}
28
29 - To get a list of the image sets on the current geometry object:
30
31 C{mari.geo.current().L{imageSetList<GeoEntity.imageSetList>}()}
32
33 - To undo the last action:
34
35 C{L{mari.history.undo<History.undo>}()}
36
37 - To add a Python script to the menu:
38
39 C{L{mari.menus.addAction<MenuManager.addAction>}(L{mari.actions.create<ActionManager.create>}('Test Action',
40 'mari.utils.message("Hello")'), 'MainWindow/Test Menu')}
41
42 - To get access to the current camera:
43
44 C{L{mari.canvases.current<CanvasManager.current>}().L{camera<Canvas.camera>}()}
45
46 - To get access to the paint buffer:
47
48 C{L{mari.canvases.paintBuffer<CanvasManager.paintBuffer>}()}
49
50 - To create an example PySide widget:
51
52 C{button = U{PySide.QtGui.QPushButton<http://doc.qt.io/qt-4.8/qpushbutton.html>}('Push Me')}
53
54 C{button.show()}
55
56
57 There are also a considerable number of example scripts documented in the L{mari.examples<examples>}
58 module. You can look at the source code of these to get some further ideas. Please note though that
59 the source code is only useful for the examples; the source code for the "mari" module is simply a set
60 of generated function stubs with doc strings provided for structural reasons.
61
62 Most functions in Mari are performed by using a manager object, as above. These managers perform
63 many operations themselves, and also provide access to other types of objects. For example, the
64 project manager object is L{mari.projects<projects>}, and calling its L{list<ProjectManager.list>}()
65 method provides L{ProjectInfo} objects to describe the projects that are available. The manager
66 objects are listed in the Variables section below.
67
68 Mari's Python API uses PySide. Reference documentation can be found at:
69 - U{https://pypi.python.org/pypi/PySide} (the PySide project)
70 - U{http://doc.qt.io/qt-4.8} (the Qt library)
71
72
73
74
75
76
77
78
79
80 @type patch_links: L{PatchLinksManager}
81 @var patch_links: Handles patch image linking.
82
83 Using this manager, you can create and managed named groups of linked images. Linked patches share their underlying image contents, so if you paint on one linked patch, all other linked patches are updated.
84
85 Currently, the API restricts linkage to L{Image} objects on the same L{ImageSet}. At some point in the future, which restriction will be removed. Some methods require an seemingly redundant L{ImageSet} parameter to make provision for such a change.
86
87 B{Example Code}
88
89 >>> # This example creates a patch link between 1001 and 1011
90 >>> import mari
91 >>> geo = mari.geo.current()
92 >>> patch_1001 = geo.patch(0)
93 >>> patch_1011 = geo.patch(10)
94 >>> layer = geo.currentChannel().createPaintableLayer("Test")
95 >>> mari.patch_links.linkPatches([patch_1001,patch_1011],"Test Link",layer.imageSet())
96 >>> print mari.patch_links.groupNamesForImageSet(layer.imageSet())[0]
97 Test Link
98
99 @type prefs: L{Preferences}
100 @var prefs: Manages retrieval and modification of user preferences.
101
102 Mari separates preferences in groups and subgroups. In the preference dialog, a group is represented by a tab, and a subgroup by a group box.
103
104 Preference groups and individual preferences are accessed in a similar way to a folder and file structure. For example, calling C{list()} might return C{('Data/', 'Scripts/')} , and their subgroups could be displayed by calling C{list('Data')} .
105
106 All preferences have a group and subgroup, so values will always be accessed in the form:
107
108 B{Example Code}
109
110 >>> import mari
111 >>> original_autosave_interval = mari.prefs.get('Data/Autosave/autosaveInterval')
112 >>> mari.prefs.set('Data/Autosave/autosaveInterval',15)
113 >>> mari.prefs.get('Data/Autosave/autosaveInterval')
114 15
115 >>> mari.prefs.set('Data/Autosave/autosaveInterval',original_autosave_interval)
116
117
118
119 @type app: L{Application}
120 @var app: This object handles basic operations to be performed on the entire application.
121
122 B{Example Code}
123
124 >>> # This example prints out "Hello World" to the application log
125 >>> import mari
126 >>> mari.app.log("Hello World")
127
128
129
130
131
132
133
134
135
136
137
138 @type menus: L{MenuManager}
139 @var menus: Manages creation and manipulation of menu entries.
140
141 The menu manager creates and manipulates entries on the menus.
142
143 Menu paths are all split into three components: the "set" (e.g. "MainWindow" for the main window menu), the "root" (e.g. "File", potentially with an "&" in it for the shortcut key), and the "submenu" (an optional menu under that, such as "Open", also possibly containing "&" characters). This split will be made automatically by the various menu functions, but it is necessary to supply at least a set and a root to add an action.
144
145 Path elements should be separated by slashes, and any leading slash is ignored - so using either "MainWindow/File" or "/MainWindow/File" is equivalent.
146
147 B{Example Code}
148
149 >>> # This example finds the "Print Hello" action from registered actions and add it to the menus
150 >>> import mari
151 >>> action = mari.actions.find("Mari/Scripts/MyCustomActions/Print Hello")
152 >>> #mari.menus.addAction(action,"MainWindow/P&ython/&Examples")
153
154 >>> # This example removes the "Print Hello" action from the menus
155 >>> import mari
156 >>> #mari.menus.removeAction("MainWindow/P&ython/&Examples/Print Hello")
157
158
159
160
161
162
163
164
165
166 @type resources: L{ResourceInfo}
167 @var resources: This provides access to Mari's resource paths and some related system functions.
168
169 The paths supplied should be accessed using a string identifier returned from one of the appropriate functions. Note that new paths cannot currently be registered through scripting.
170
171 The current value of a path can be accessed with code like the following: C{mari.resources.path(mari.resources.USER_SCRIPTS)}
172
173 Many paths can be overridden by environment variables that match their string identifiers. For example, C{mari.resources.USER_SCRIPTS} is set to the string "MARI_SCRIPT_PATH", and if an environment variable with that name is found when Mari launches, the user scripts path will be set to its contents.
174
175 The paths that can be modified by users will generally have string identifiers that begin with "MARI_", which also makes the environment variables clearer. Alternatively, an individual path can be checked for modifiability by calling C{mari.scripts.setPath()} on it; the function will raise an exception if the path is not user-modifiable.
176
177 B{Example Code}
178
179 >>> # This example shows how to obtain the path to example directory
180 >>> import mari
181 >>> example_dir_path = mari.resources.path(mari.resources.EXAMPLES)
182
183
184
185
186 @type tools: L{ToolManager}
187 @var tools: Provides access to the various interactive user tools.
188
189 B{Example Code}
190
191 >>> # This example shows how to print the name of the current tool
192 >>> import mari
193 >>> print mari.tools.current()
194 Paint (P)
195
196
197
198
199
200
201 @type shelves: L{ShelfManager}
202 @var shelves: This manages the available shelves, or sets of item bookmarks.
203
204 B{Example Code}
205
206 >>> # This example shows how to obtain the "Personal" shelf
207 >>> import mari
208 >>> personal_shelf = mari.shelves.find("Personal")
209 >>> print personal_shelf.className()
210 Shelf
211
212
213
214
215 @type projects: L{ProjectManager}
216 @var projects: Handles opening, closing, and general manipulation of projects.
217
218 Information about the available projects can be obtained using the L{list()} method. This returns L{ProjectInfo} objects to describe the projects can be opened. These projects will only be available as L{Project} objects after opening.
219
220 B{Example Code}
221
222 >>> # This example shows how to obtain the Project object representing the current project
223 >>> import mari
224 >>> project = mari.projects.current()
225
226
227 @type actions: L{ActionManager}
228 @var actions: Manages creation and manipulation of actions.
229
230 This class creates and manipulates Mari actions, which are used as menu commands, and can have shortcut keys bound to them. By default, any action created through scripting will be in the "/Mari/Scripts" path, but this can be customized if there is any need to avoid clashes.
231
232 Mari stores all of the available actions in a tree, and actions are identified by their path within this tree. For example, "/Mari/Tools/TestTool" refers to an action called TestTool in a subsection called Tools.
233
234 B{Example Code}
235
236 >>> # This example creates an action through mari.actions(ActionManager singleton instance) to print "Hello World" to the log and executes the action
237 >>> import mari
238 >>> action = mari.actions.create("MyCustomActions/Print Hello","mari.app.log('Hello World')")
239 >>> action.trigger()
240
241 >>> # This example finds the action and executes it
242 >>> import mari
243 >>> action = mari.actions.find("Mari/Scripts/MyCustomActions/Print Hello")
244 >>> action.trigger()
245
246
247 @type projectors: L{ProjectorManager}
248 @var projectors: This object manages projectors in the project, including creation and listing.
249
250 B{Example Code}
251
252 >>> # This examples shows how to create a new projector
253 >>> import mari
254 >>> projector = mari.projectors.create("Test Projector")
255 >>> print projector.name()
256 Test Projector
257 >>> mari.projectors.remove(projector.name())
258
259
260
261
262
263
264
265
266 @type palettes: L{PaletteManager}
267 @var palettes: Manages creation and manipulation of palettes (dockable widgets).
268
269 Palettes are dockable widgets that can be moved around and configured by the user.
270
271 B{Example Code}
272
273 >>> # This example shows how to create a palette with a label
274 >>> import mari, PySide
275 >>> label = PySide.QtGui.QLabel("Hello World")
276 >>> new_palette = mari.palettes.create("Hello Palette",label)
277 >>> mari.palettes.remove(new_palette.name());
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312 @type projection: L{ProjectionManager}
313 @var projection: Handles settings used to project the paint buffer into a scene.
314
315
316 @type canvases: L{CanvasManager}
317 @var canvases: This object handles the list of canvases, or viewports, available in the project.
318
319 B{Example Code:}
320
321 >>> # This example shows how to access the current canvas object and to print canvas size to the application log
322 >>> import mari
323 >>> canvas = mari.canvases.current()
324 >>> mari.app.log(str(canvas.size()))
325
326 >>> # This example show hot obtain the list of canvases
327 >>> import mari
328 >>> canvases = mari.canvases.list()
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343 """
344
345 __copyright__ = "2017 The Foundry Visionmongers Inc. All rights reserved."
346 __date__ = "2017/10/13"
347 __version__ = "4.0v1.000316b"
351 """A canvas is a Mari viewport.
352
353 Canvases are the geometry viewport containers in the Mari window.
354
355 You can access canvas objects through the L{CanvasManager} - for example: C{mari.canvases.current()}
356
357 B{Example Code:}
358
359 >>> # This example shows how to access the current canvas object and to print canvas size to the application log
360 >>> import mari
361 >>> canvas = mari.canvases.current()
362 >>> mari.app.log(str(canvas.size()))
363
364 @cvar PICKSPACE_PAINTING: Pick colors pre lighting and color management (colors will be in the 'Working' color-space).
365 @cvar PICKSPACE_SCREEN: Pick colors post lighting and color management (colors will be in the 'Monitor' color-space).
366 """
367
369 """These are used to define the space in which to pick pixels in.
370 @cvar PICKSPACE_PAINTING: Pick colors pre lighting and color management (colors will be in the 'Working' color-space).
371 @cvar PICKSPACE_SCREEN: Pick colors post lighting and color management (colors will be in the 'Monitor' color-space).
372 @note: These values are exposed in the parent class, but are also documented here for convenience.
373 """
374 PICKSPACE_PAINTING = 0
375 PICKSPACE_SCREEN = 1
376
377 PICKSPACE_PAINTING = 0
378 PICKSPACE_SCREEN = 1
379
381 """Calculate the average color for an area in the canvas.
382
383 This allows a script to calculate the average pixel color values from the canvas. The x and y position must be in the range returned by L{size()} The color returned may be an HDR value with r, g, b values above 1.0 This method is relatively slow to execute and should not be used to the query lots of pixels
384
385
386 C{#Pick a pixel in the middle of the screen}
387
388 C{Size = mari.canvases.current().size();}
389
390 C{c = mari.canvases.current().pickColor(Size.width()/2, Size.height()/2)}
391
392 C{print c.toString()}
393
394 @type X: int
395 @param X: The x coordinate of the sample area. These coordinates are relative to the top left corner of the canvas
396 @type Y: int
397 @param Y: The y coordinate of the sample area. These coordinates are relative to the top left corner of the canvas
398 @type Width: int
399 @param Width: The width of the sample area. These coordinates are relative to the top left corner of the canvas
400 @type Height: int
401 @param Height: The height of the sample area. These coordinates are relative to the top left corner of the canvas
402 @type Space: L{PickSpace}
403 @param Space: The space in which to pick pixels in
404 @rtype: L{Color}
405 @return: The average color of the pixels at the canvas location (x, y, x + width, y + height)
406 @raise ValueError: Emitted if the sample area is outside of the range (0, 0) - L{size()}
407 """
408 pass
409
411 """Returns the interface to the camera on the canvas, or None if none exists.
412
413 @rtype: L{Camera}
414 @return: The camera on the canvas, or None if none exists
415 """
416 pass
417
419 """Captures an image of the canvas and returns it.
420
421 This is used for preview images of projects, for example.
422
423 @rtype: QImage
424 @return: A QImage containing the frame buffer image
425 """
426 pass
427
429 """Captures a pixmap of the canvas and returns it.
430
431 This is used for preview images of projects, for example.
432
433 @type ScaledWidth: int
434 @param ScaledWidth: If non-zero, the captured image is scaled to this width in pixels
435 @type ScaledHeight: int
436 @param ScaledHeight: If non-zero, the captured image is scaled to this height in pixels
437 @rtype: QPixmap
438 @return: A QPixmap containing the frame buffer image
439 @deprecated: This function will be removed in a future version. Please use L{capture()} instead and then convert to a QPixmap if required.
440 """
441 pass
442
444 """Returns display property names that can be used as keys to manipulate any of the properties individually.
445
446 C{mari.canvases.current().displayPropertyList()}
447
448 @rtype: list of str
449 @return: a list of property keys
450 """
451 pass
452
454 """Determines the state of a display property.
455
456 Get whether HUD is visible
457
458 C{mari.canvases.current().getDisplayProperty("HUD/RenderHud")}
459
460 Get the background image of the canvas
461
462 C{mari.canvases.current().getDisplayProperty("Background/BackgroundTexture")}
463
464 Get the grid size
465
466 C{mari.canvases.current().getDisplayProperty("Grid/UvGridSize")}
467
468 @type PropertyKey: str
469 @param PropertyKey: A display property key to query, in the form "group name/sub property name". e.g : HUD/RenderHud
470 @rtype: variant
471 @return: A display property value
472 """
473 pass
474
476 """Pick a color from the canvas.
477
478 This allows a script to pick pixel color values from the canvas. The x and y position must be in the range returned by L{size()} The color returned may be an HDR value with r, g, b values above 1.0 This method is relatively slow to execute and should not be used to the query lots of pixels
479
480
481 C{#Pick a pixel in the middle of the screen}
482
483 C{Size = mari.canvases.current().size();}
484
485 C{c = mari.canvases.current().pickColor(Size.width() / 2, Size.height() / 2)}
486
487 C{print c.toString()}
488
489 @type X: int
490 @param X: The x coordinate of the pixel. These coordinates are relative to the top left corner of the canvas
491 @type Y: int
492 @param Y: The y coordinate of the pixel. These coordinates are relative to the top left corner of the canvas
493 @type Space: L{PickSpace}
494 @param Space: The space in which to pick pixels in
495 @rtype: L{Color}
496 @return: The color of the pixel at the canvas location (x, y)
497 @raise ValueError: Emitted if X or Y are outside of the range (0, 0) - L{size()}
498 """
499 pass
500
502 """Forces the canvas to repaint itself immediately.
503
504 @rtype: None
505 """
506 pass
507
509 """Requests the canvas to be repainted during the next events' processing.
510
511 @rtype: None
512 """
513 pass
514
516 """Returns the interface to the scene camera associated with canvas's camera, or None, if none exists.
517
518 @rtype: L{Camera}
519 @return: The scene camera associated with canvas's camera, or None, if none exists.
520 """
521 pass
522
524 """Sets the state of a display property.
525
526 Enable HUD
527
528 C{mari.canvases.current().setDisplayProperty("HUD/RenderHud", True)}
529
530 Set the background image of the canvas
531
532 C{mari.canvases.current().setDisplayProperty("Background/BackgroundTexture", "/tmp/bluesky.jpg")}
533
534 Set the grid size
535
536 C{mari.canvases.current().setDisplayProperty("Grid/UvGridSize", 5)}
537
538 @type PropertyKey: str
539 @param PropertyKey: A display property key to set, in the form "group name/sub property name". e.g : HUDRenderHud
540 @type NewValue: variant
541 @param NewValue: The new value to set
542 @rtype: None
543 """
544 pass
545
547 """Return the size of the L{Canvas} in pixels.
548
549 C{print mari.canvases.current().size()}
550
551 @rtype: QSize
552 @return: The Size of the canvas in pixels
553 """
554 pass
555
558 """
559 @cvar COLORSPACE_TARGET_INT8: Default for channels and, reading and writing image files containing 8 bit integer data.
560 @cvar COLORSPACE_TARGET_INT16: Default for reading image files containing integer data more than 8 bits (not half float).
561 @cvar COLORSPACE_TARGET_SCALAR8: Default for masks, heights, normals, depths, and other non-color images containing 8 bit data.
562 @cvar COLORSPACE_TARGET_FLOAT: Default for channels and, reading and writing image files containing floating-point data.
563 @cvar COLORSPACE_TARGET_WORKING: Default for painting, lighting, applying filters, and other such operations. You will typically want to select the \"Linear\" colorspace to get accurate results.
564 @cvar COLORSPACE_TARGET_MONITOR: Default for thumbnails. You will typically want to select the same colorspace as the viewer.
565 @cvar COLORSPACE_TARGET_COLOR_PICKER: Default for color pickers and swatches. You will typically want to select the same colorspace as the current channel.
566 @cvar COLORSPACE_TARGET_BLENDING: Default for applying blending operations such as, comp of the paint buffer and the current paint target, blending between layers, and combining inputs in a merge node. You will typically want to select the \"Default\" colorspace to get the same results as painting prior to Mari 3.0, and to get less banding artifacts when painting 8-bit channels and images.
567 @cvar COLORSPACE_TARGET_COUNT: Total number of colorspace targets.
568 """
569
571 """These are used to define the default colorspace of a data type or device.
572 @cvar COLORSPACE_TARGET_INT8: Default for channels and, reading and writing image files containing 8 bit integer data.
573 @cvar COLORSPACE_TARGET_INT16: Default for reading image files containing integer data more than 8 bits (not half float).
574 @cvar COLORSPACE_TARGET_SCALAR8: Default for masks, heights, normals, depths, and other non-color images containing 8 bit data.
575 @cvar COLORSPACE_TARGET_FLOAT: Default for channels and, reading and writing image files containing floating-point data.
576 @cvar COLORSPACE_TARGET_WORKING: Default for painting, lighting, applying filters, and other such operations. You will typically want to select the \"Linear\" colorspace to get accurate results.
577 @cvar COLORSPACE_TARGET_MONITOR: Default for thumbnails. You will typically want to select the same colorspace as the viewer.
578 @cvar COLORSPACE_TARGET_COLOR_PICKER: Default for color pickers and swatches. You will typically want to select the same colorspace as the current channel.
579 @cvar COLORSPACE_TARGET_BLENDING: Default for applying blending operations such as, comp of the paint buffer and the current paint target, blending between layers, and combining inputs in a merge node. You will typically want to select the \"Default\" colorspace to get the same results as painting prior to Mari 3.0, and to get less banding artifacts when painting 8-bit channels and images.
580 @cvar COLORSPACE_TARGET_COUNT: Total number of colorspace targets.
581 @note: These values are exposed in the parent class, but are also documented here for convenience.
582 """
583 COLORSPACE_TARGET_INT8 = 0
584 COLORSPACE_TARGET_INT16 = 1
585 COLORSPACE_TARGET_SCALAR8 = 2
586 COLORSPACE_TARGET_FLOAT = 3
587 COLORSPACE_TARGET_WORKING = 4
588 COLORSPACE_TARGET_MONITOR = 5
589 COLORSPACE_TARGET_COLOR_PICKER = 6
590 COLORSPACE_TARGET_BLENDING = 7
591 COLORSPACE_TARGET_COUNT = 8
592
593 COLORSPACE_TARGET_INT8 = 0
594 COLORSPACE_TARGET_INT16 = 1
595 COLORSPACE_TARGET_SCALAR8 = 2
596 COLORSPACE_TARGET_FLOAT = 3
597 COLORSPACE_TARGET_WORKING = 4
598 COLORSPACE_TARGET_MONITOR = 5
599 COLORSPACE_TARGET_COLOR_PICKER = 6
600 COLORSPACE_TARGET_BLENDING = 7
601 COLORSPACE_TARGET_COUNT = 8
602
604 """Returns a list of all the available colorspaces present in the OCIO config file for a particular target.
605
606 @rtype: list of str
607 @return: The list of colorspaces within the OCIO config file for a particular target.
608 """
609 pass
610
612 """Returns True if color management is enabled on the project.
613
614 @rtype: bool
615 @see: L{setColorManagementEnabled()}
616 """
617 pass
618
620 """Returns the colorspace or role for a particular target.
621
622 @type Target: L{ColorspaceTarget}
623 @param Target: The target in the pipeline where a colorspace or role can be defined.
624 @rtype: str
625 @return: The colorspace or role of the target data type or device.
626 @raise IndexError: Raised if the target index is out of range.
627 @see: L{setColorspace()}
628 """
629 pass
630
632 """Returns the default colorspace or role for a particular target.
633
634 @type Target: L{ColorspaceTarget}
635 @param Target: The target data type or device for which a colorspace can be defined.
636 @rtype: str
637 @return: The default colorspace or role of the target data type or device.
638 @raise IndexError: Raised if the target index is out of range.
639 """
640 pass
641
643 """Returns the OCIO config file.
644
645 @rtype: str
646 @see: L{setFileName()}
647 """
648 pass
649
651 """Returns True if the given colorspace is present in the OCIO config file.
652
653 @type Colorspace: str
654 @param Colorspace: The colorspace or role to look for.
655 @rtype: bool
656 @return: True if the colorspace is present in the configuration file, False otherwise.
657 """
658 pass
659
661 """Returns True if the OCIO config file is not one of the standard ones packaged with Mari.
662
663 @rtype: bool
664 """
665 pass
666
668 """Returns True if the OCIO config file is valid.
669
670 @rtype: bool
671 """
672 pass
673
675 """Returns True if the OCIO config file and corresponding colorspace targets are valid.
676
677 @rtype: bool
678 """
679 pass
680
682 """Sets both the OCIO config file and each of the colorspace targets to their default.
683
684 @rtype: None
685 """
686 pass
687
689 """Sets whether color management is enabled on the project.
690
691 @type Enable: bool
692 @param Enable: Whether color management is enabled.
693 @rtype: None
694 @see: L{colorManagementEnabled()}
695 """
696 pass
697
699 """Sets the colorspace for a particular target.
700
701 @type Target: L{ColorspaceTarget}
702 @param Target: The target data type or device for which a colorspace can be defined.
703 @type Colorspace: str
704 @param Colorspace: The new colorspace of the target data type or device.
705 @rtype: None
706 @raise IndexError: Raised if the target index is out of range.
707 @raise ValueError: Raised if an invalid colorspaces, for the OCIO config file, is given.
708 @see: L{colorspace()}
709 """
710 pass
711
713 """Sets the OCIO config file.
714
715 This causes the targets to be validated and updated to sensible defaults if they aren't within the new OCIO config file.
716
717 @type FileName: str
718 @param FileName: Either the name of a standard OCIO config file packaged with Mari or a path to a custom one.
719 @rtype: None
720 @see: L{fileName()}
721 """
722 pass
723
724 - def __init__(self, FileName="", ColorSpaces=[], ColorManagementEnabled=True):
725 """Creates a new colorspace config.
726
727 @type FileName: str
728 @type ColorSpaces: list of str
729 @type ColorManagementEnabled: bool
730 @rtype: L{ColorspaceDefaults}
731 @raise ValueError: Raised if an invalid number of colorspaces is given.
732 """
733 pass
734
737 """Manages the selection groups in the scene.
738
739 @cvar SELECTION_MODE_PATCHES: Selection mode of type patch.
740 @cvar SELECTION_MODE_OBJECTS: Selection mode of type object.
741 @cvar SELECTION_MODE_FACES: Selection mode of type face.
742 @group Signals: hiddenChanged, lockedChanged, modeChanged, selectModeChanged, selectedChanged, selectionGroupAdded, selectionGroupRemoved, visibleChanged
743 """
744
746 """Modes of selections.
747 @cvar SELECTION_MODE_PATCHES: Selection mode of type patch.
748 @cvar SELECTION_MODE_OBJECTS: Selection mode of type object.
749 @cvar SELECTION_MODE_FACES: Selection mode of type face.
750 @note: These values are exposed in the parent class, but are also documented here for convenience.
751 """
752 SELECTION_MODE_PATCHES = 0
753 SELECTION_MODE_OBJECTS = 1
754 SELECTION_MODE_FACES = 2
755
756 SELECTION_MODE_PATCHES = 0
757 SELECTION_MODE_OBJECTS = 1
758 SELECTION_MODE_FACES = 2
759
761 """Create new group from current selection in project.
762
763 @type name: str
764 @param name: The L{name} to set for the selection group.
765 @rtype: None
766 @raise RuntimeError: Raised if no project was open.
767 """
768 pass
769
771 """Returns the currently selected selection group.
772
773 @rtype: L{SelectionGroup}
774 @return: The currently selected selection group.
775 @raise ValueError: Raised if no project was open.
776 """
777 pass
778
780 """Emitted when the L{hidden} state of a selection L{group} in the scene is changed.
781
782 @type group: L{SelectionGroup}
783 @param group: The affected selection L{group}.
784 @type hidden: bool
785 @param hidden: The locked state.
786 @rtype: None
787 """
788 pass
789
791 """Returns a list of all selection groups in the project.
792
793 @rtype: list of L{SelectionGroup}
794 @return: List of selection groups in the project.
795 @raise ValueError: Raised if no project was open.
796 """
797 pass
798
800 """Emitted when the L{locked} state of a selection L{group} in the scene is changed.
801
802 @type group: L{SelectionGroup}
803 @param group: The affected selection L{group}.
804 @type locked: bool
805 @param locked: The L{locked} state.
806 @rtype: None
807 """
808 pass
809
811 """Emitted when the L{mode} of a selection L{group} in the scene is changed.
812
813 @type group: L{SelectionGroup}
814 @param group: The affected selection L{group}.
815 @type mode: L{SelectionGroupManager.SelectionMode}
816 @param mode: The selection L{mode}.
817 @rtype: None
818 """
819 pass
820
822 """Remove a selection L{group} from the project.
823
824 @type group: L{SelectionGroup}
825 @param group: The selection L{group} to remove.
826 @rtype: None
827 @raise RuntimeError: Raised if no project was open.
828 """
829 pass
830
832 """Returns the current mode of the selection in the project.
833
834 @rtype: L{SelectionMode}
835 @return: The current mode of selection.
836 """
837 pass
838
840 """Selects a selection L{group} from the project.
841
842 @type group: L{SelectionGroup}
843 @param group: The selection L{group} to select.
844 @rtype: None
845 @raise RuntimeError: Raised if no project was open.
846 """
847 pass
848
850 """Emitted when the selection L{mode} in the scene changes.
851
852 @type mode: L{SelectionGroupManager.SelectionMode}
853 @param mode: The new selection L{mode}.
854 @rtype: None
855 """
856 pass
857
859 """Emitted when the L{selected} state of a selection L{group} in the scene is changed.
860
861 @type group: L{SelectionGroup}
862 @param group: The affected selection L{group}.
863 @type selected: bool
864 @param selected: The L{selected} state.
865 @rtype: None
866 """
867 pass
868
870 """Returns a list of all selected selection groups in the project.
871
872 @rtype: list of L{SelectionGroup}
873 @return: List of selected selection groups in the project.
874 @raise ValueError: Raised if no project was open.
875 """
876 pass
877
879 """Emitted when a selection L{group} is added.
880
881 @type group: L{SelectionGroup}
882 @param group: The new selection L{group}.
883 @rtype: None
884 """
885 pass
886
888 """Emitted when a selection L{group} is removed.
889
890 @type group: L{SelectionGroup}
891 @param group: The selection L{group}.
892 @rtype: None
893 """
894 pass
895
897 """Sets the L{mode} of selection in the scene.
898
899 @type mode: L{SelectionMode}
900 @param mode: The selection L{mode} to set
901 @rtype: None
902 """
903 pass
904
906 """Emitted when the visibility state of a selection L{group} in the scene is changed.
907
908 @type group: L{SelectionGroup}
909 @param group: The affected selection L{group}.
910 @type visible: bool
911 @param visible: The visibility state.
912 @rtype: None
913 """
914 pass
915
918 """Manages export functionality of Mari.
919
920 B{Example Code}
921
922 >>> # Get Current GeoEntity
923 >>> geo = mari.geo.current()
924 >>> # Get a Channel from the GeoEntity
925 >>> channel = geo.channelList()[0]
926 >>> # Create an ExportItem for the Channel and configure its source and target
927 >>> eItem = mari.ExportItem()
928 >>> eItem.setSourceNodeName(channel.name())
929 >>> eItem.setFileTemplate("$CHANNEL.$UDIM.tif")
930 >>> # Add ExportItem to ExportManager
931 >>> mari.exports.addExportItem(eItem, mari.current.geo())
932 >>> # Export the ExportItem with a resolution override
933 >>> mari.exports.exportTextures([eItem], "/tmp", Overrides = {"RESOLUTION": "512 x 512"})
934
935 @group Signals: itemExported
936 """
937
939 """Adds L{ExportItem} associated with the given L{GeoEntity}.
940
941 @type Item: L{ExportItem}
942 @param Item: The L{ExportItem} to add to the L{Entity}
943 @type Entity: L{GeoEntity}
944 @param Entity: The parent L{GeoEntity} to add the L{ExportItem} to
945 @rtype: None
946 """
947 pass
948
950 """Returns the list of supported texture colorspace for export.
951
952 Use this function to obtain the list of supported texture colorspace. "Original" indicates the original colorspace specified in the original channel or node.
953
954 @rtype: list of str
955 @return: The list of supported texture colorspace for export
956 """
957 pass
958
960 """Returns the list of supported texture depth for export.
961
962 Use this function to obtain the list of supported texture depth. "Original" indicates the original depth specified in the original channel or node.
963
964 @rtype: list of str
965 @return: The list of supported texture depth for export
966 """
967 pass
968
970 """Returns the list of L{ExportItem} for the given L{GeoEntity}.
971
972 @type Entity: L{GeoEntity}
973 @param Entity: The L{GeoEntity} the list of L{ExportItem} is returned for
974 @rtype: list of L{ExportItem}
975 @return: the list of L{ExportItem} for the given L{GeoEntity}
976 """
977 pass
978
979 - def exportTextures(self, ExportItems, ExportRootPath, Overrides=None):
980 """Export textures with the settings from given L{ExportItem} applied.
981
982 >>> #This example globally overrides the patch list to export using an integer list in UV_INDICES overrides
983 >>> eItems = []
984 >>> for geo in mari.geo.list():
985 ... eItem = mari.ExportItem()
986 ... for node in geo.nodeGraph().nodeList():
987 ... if node.nodeName()=="diffuse":
988 ... eItem.setSourceNode(node)
989 ... eItem.setFileTemplate("$ENTITY/$CHANNEL.$UDIM.tif")
990 ... mari.exports.addExportItem(eItem, geo)
991 ... eItems.append(eItem)
992 >>>
993 >>> mari.exports.exportTextures(
994 ... eItems,
995 ... "/tmp",
996 ... L{Overrides}={"UV_INDICES": [0, 1, 2, 5]} # Export UDIMs 1001-1003 & 1006 of all GeoEntities
997 ... )
998
999 >>> geo1, geo2 = mari.geo.list() # Assigns two GeoEntity instances to variables
1000 >>> eItems = []
1001 >>> for geo in (geo1,geo2):
1002 ... eItem = mari.ExportItem()
1003 ... for node in geo.nodeGraph().nodeList():
1004 ... if node.nodeName()=="diffuse":
1005 ... eItem.setSourceNode(node)
1006 ... eItem.setFileTemplate("$ENTITY/$CHANNEL.$UDIM.tif")
1007 ... mari.exports.addExportItem(eItem, geo)
1008 ... eItems.append(eItem)
1009 >>>
1010 >>> mari.exports.exportTextures(
1011 ... eItems,
1012 ... "/tmp",
1013 ... L{Overrides}={"UV_INDICES": {geo1.uuid():[0], geo2.uuid():[5]}} # Export UDIM 1001 from Geo1 and 1006 from Geo2
1014 ... )
1015
1016 @type ExportItems: list of L{ExportItem}
1017 @type ExportRootPath: str
1018 @type Overrides: variant
1019 @rtype: str
1020 @return: Returns the error message encountered during export
1021 """
1022 pass
1023
1025 """Returns the list of supported image file extensions for export.
1026
1027 Use this function to obtain the list of supported image file extensions. "Original" indicates the original file format specified in the original channel or node.
1028
1029 @rtype: list of str
1030 @return: The list of supported image file extensions for export
1031 """
1032 pass
1033
1035 """Returns the dictionary of image file options for the given file extension.
1036
1037 Use this function to obtain the result of
1038
1039 @type Extension: str
1040 @param Extension: File extension to query the image file options for
1041 @rtype: variant
1042 @return: the dictionary for the file type specific options
1043 """
1044 pass
1045
1055
1057 """Emitted upon completion of exporting textures for the L{ExportItem}.
1058
1059 @type Item: L{ExportItem}
1060 @param Item: L{ExportItem} object that has been exported
1061 @rtype: None
1062 """
1063 pass
1064
1066 """Returns the list of post process commands for export.
1067
1068 Use this function to obtain the list of post process commands.
1069
1070 @rtype: list of str
1071 @return: The list of post process commands
1072 """
1073 pass
1074
1076 """Registers a post process command to be listed by L{postProcessCommandList()}.
1077
1078 The post process command is run per image after exporting an image. $EXPORTED token within the command will be replaced by the file path of the exported image.
1079
1080 @type Command: str
1081 @param Command: The post process command to be run after exporting an image. $EXPORTED token will be replaced by the file path for each exported image.
1082 @rtype: None
1083 """
1084 pass
1085
1087 """Removes the given L{ExportItem}.
1088
1089 @type Item: L{ExportItem}
1090 @param Item: The L{ExportItem} to remove
1091 @rtype: None
1092 """
1093 pass
1094
1096 """Returns the list of supported texture resolutions for export.
1097
1098 Use this function to obtain the list of supported texture resolutions. "Original" indicates the original resolution specified in the original channel or node.
1099
1100 @rtype: list of str
1101 @return: The list of supported texture resolutions for export
1102 """
1103 pass
1104
1105
1106 -class Event(object):
1107 """Provides a method for sending events to the system.
1108
1109 B{Example Code}
1110
1111 >>> #This example sends "B" key to the canvas, which bakes the paint by default
1112 >>> import mari
1113 >>> import PySide
1114 >>> mari.event.sendKeyEvent(mari.event.KEY_PRESS,PySide.QtCore.Qt.Key_B,0,False)
1115
1116 @cvar CANVAS_SPACE: Origin is at the top-left pixel of the currently active canvas.
1117 @cvar APPLICATION_SPACE: Origin is at the top-left pixel of the main window.
1118 @cvar DESKTOP_SPACE: Origin is at the top-left pixel of the desktop.
1119 @cvar NO_MODIFIER: No modifier key is pressed.
1120 @cvar SHIFT_MODIFIER: A Shift key on the keyboard is pressed.
1121 @cvar CONTROL_MODIFIER: A Ctrl key on the keyboard is pressed.
1122 @cvar ALT_MODIFIER: An Alt key on the keyboard is pressed.
1123 @cvar META_MODIFIER: A Meta key on the keyboard is pressed.
1124 @cvar KEYPAD_MODIFIER: A keypad button is pressed.
1125 @cvar GROUP_SWITCH_MODIFIER: X11 only. A Mode_switch key on the keyboard is pressed.
1126 @cvar NO_BUTTON: The button state does not refer to any button.
1127 @cvar LEFT_BUTTON: The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.).
1128 @cvar RIGHT_BUTTON: The right button.
1129 @cvar MIDDLE_BUTTON: The middle button.
1130 @cvar X_BUTTON_1: The first X button.
1131 @cvar X_BUTTON_2: The second X button.
1132 @group Signals: playbackComplete
1133 """
1134
1136 """This enum defines which coordinate space the position of an event is in.
1137 @cvar CANVAS_SPACE: Origin is at the top-left pixel of the currently active canvas.
1138 @cvar APPLICATION_SPACE: Origin is at the top-left pixel of the main window.
1139 @cvar DESKTOP_SPACE: Origin is at the top-left pixel of the desktop.
1140 @note: These values are exposed in the parent class, but are also documented here for convenience.
1141 """
1142 CANVAS_SPACE = 0
1143 APPLICATION_SPACE = 1
1144 DESKTOP_SPACE = 2
1145
1146 CANVAS_SPACE = 0
1147 APPLICATION_SPACE = 1
1148 DESKTOP_SPACE = 2
1149
1165
1166 KEY_PRESS = 6
1167 KEY_RELEASE = 7
1168 MOUSE_DOUBLE_CLICK = 4
1169 MOUSE_PRESS = 2
1170 MOUSE_RELEASE = 3
1171 MOUSE_MOVE = 5
1172 TABLET_MOVE = 87
1173 TABLET_PRESS = 92
1174 TABLET_RELEASE = 93
1175 TABLET_ENTER_PROXIMITY = 171
1176 TABLET_LEAVE_PROXIMITY = 172
1177
1179 """This enum describes the modifier keys.
1180 @cvar NO_MODIFIER: No modifier key is pressed.
1181 @cvar SHIFT_MODIFIER: A Shift key on the keyboard is pressed.
1182 @cvar CONTROL_MODIFIER: A Ctrl key on the keyboard is pressed.
1183 @cvar ALT_MODIFIER: An Alt key on the keyboard is pressed.
1184 @cvar META_MODIFIER: A Meta key on the keyboard is pressed.
1185 @cvar KEYPAD_MODIFIER: A keypad button is pressed.
1186 @cvar GROUP_SWITCH_MODIFIER: X11 only. A Mode_switch key on the keyboard is pressed.
1187 @note: These values are exposed in the parent class, but are also documented here for convenience.
1188 """
1189 NO_MODIFIER = 0x00000000
1190 SHIFT_MODIFIER = 0x02000000
1191 CONTROL_MODIFIER = 0x04000000
1192 ALT_MODIFIER = 0x08000000
1193 META_MODIFIER = 0x10000000
1194 KEYPAD_MODIFIER = 0x20000000
1195 GROUP_SWITCH_MODIFIER = 0x40000000
1196
1197 NO_MODIFIER = 0x00000000
1198 SHIFT_MODIFIER = 0x02000000
1199 CONTROL_MODIFIER = 0x04000000
1200 ALT_MODIFIER = 0x08000000
1201 META_MODIFIER = 0x10000000
1202 KEYPAD_MODIFIER = 0x20000000
1203 GROUP_SWITCH_MODIFIER = 0x40000000
1204
1221
1222 NO_BUTTON = 0x00000000
1223 LEFT_BUTTON = 0x00000001
1224 RIGHT_BUTTON = 0x00000002
1225 MIDDLE_BUTTON = 0x00000004
1226 X_BUTTON_1 = 0x00000008
1227 X_BUTTON_2 = 0x00000010
1228
1230 """Returns whether or not any events are currently queued for playback.
1231
1232 @rtype: bool
1233 @return: True one or more events are in the event queue.
1234 """
1235 pass
1236
1238 """This is emitted after the event queue has finished playing any events it had queued.
1239
1240 @rtype: None
1241 """
1242 pass
1243
1245 """Playback all the events currently recorded.
1246
1247 @rtype: None
1248 """
1249 pass
1250
1252 """Called to begin recording of the events sent to the receiver.
1253
1254 @type Space: L{EventCoordinateSpace}
1255 @param Space: The coordinate space to use for any mouse and/or tablet events.
1256 @type Normalized: bool
1257 @param Normalized: Whether recorded positions should be specified in normalised device coordinates(0.0 - 1.0) or pixels.
1258 @rtype: None
1259 """
1260 pass
1261
1263 """Called to end recording triggered by a previous call to 'recordStart'.
1264
1265 @rtype: None
1266 """
1267 pass
1268
1270 """Returns the commands required to playback the events currently recorded.
1271
1272 @rtype: str
1273 @return: The playback commands.
1274 """
1275 pass
1276
1277 - def sendKeyEvent(self, Type, Key, Modifiers, AutoRepeat, Msecs=0):
1278 """Triggers a key event directly in the receiver.
1279
1280 @type Type: L{EventType}
1281 @param Type: The type of key event to trigger.
1282 @type Key: int
1283 @param Key: The key code that triggers the event.
1284 @type Modifiers: int
1285 @param Modifiers: The keyboard modifier flags that existed immediately before the event occurred.
1286 @type AutoRepeat: bool
1287 @param AutoRepeat: True if this event comes from an auto-repeating key; False if it comes from an initial key press.
1288 @type Msecs: int
1289 @param Msecs: How many milliseconds to wait before sending the event.
1290 @rtype: None
1291 """
1292 pass
1293
1295 """Triggers a mouse event directly in the receiver.
1296
1297 @type Type: L{EventType}
1298 @param Type: The type of mouse event to trigger.
1299 @type Pos: QPointF
1300 @param Pos: The mouse cursor's position relative to the receiver.
1301 @type Button: L{MouseButton}
1302 @param Button: The button that triggers the event.
1303 @type Buttons: int
1304 @param Buttons: Returns the button state when the event was generated. The button state is a combination of 'MouseButton' values.
1305 @type Modifiers: int
1306 @param Modifiers: The keyboard modifier flags that existed immediately before the event occurred.
1307 @type Space: L{EventCoordinateSpace}
1308 @param Space: The coordinate space of the given position 'Pos'.
1309 @type Normalized: bool
1310 @param Normalized: Whether the given position 'Pos' is specified in normalized device coordinates(0.0 - 1.0) or pixels.
1311 @type Msecs: int
1312 @param Msecs: How many milliseconds to wait before sending the event.
1313 @rtype: None
1314 """
1315 pass
1316
1318 """Triggers a tablet event directly in the receiver.
1319
1320 @type Type: L{EventType}
1321 @param Type: The type of tablet event to trigger.
1322 @type Pos: QPointF
1323 @param Pos: The mouse cursor's position relative to the receiver.
1324 @type Pressure: qreal
1325 @param Pressure: The pressure for the device. 0.0 indicates that the stylus is not on the tablet, 1.0 indicates the maximum amount of pressure for the stylus.
1326 @type Modifiers: int
1327 @param Modifiers: The keyboard modifier flags that existed immediately before the event occurred.
1328 @type Space: L{EventCoordinateSpace}
1329 @param Space: The coordinate space of the given position 'Pos'.
1330 @type Normalized: bool
1331 @param Normalized: Whether the given position 'Pos' is specified in normalised device coordinates(0.0 - 1.0) or pixels.
1332 @type Msecs: int
1333 @param Msecs: How many milliseconds to wait before sending the event.
1334 @rtype: None
1335 """
1336 pass
1337
1340 """Handles patch image linking.
1341
1342 Using this manager, you can create and managed named groups of linked images. Linked patches share their underlying image contents, so if you paint on one linked patch, all other linked patches are updated.
1343
1344 Currently, the API restricts linkage to L{Image} objects on the same L{ImageSet}. At some point in the future, which restriction will be removed. Some methods require an seemingly redundant L{ImageSet} parameter to make provision for such a change.
1345
1346 B{Example Code}
1347
1348 >>> # This example creates a patch link between 1001 and 1011
1349 >>> import mari
1350 >>> geo = mari.geo.current()
1351 >>> patch_1001 = geo.patch(0)
1352 >>> patch_1011 = geo.patch(10)
1353 >>> layer = geo.currentChannel().createPaintableLayer("Test")
1354 >>> mari.patch_links.linkPatches([patch_1001,patch_1011],"Test Link",layer.imageSet())
1355 >>> print mari.patch_links.groupNamesForImageSet(layer.imageSet())[0]
1356 Test Link
1357
1358 @group Signals: groupAdded, groupRemoved, groupRenamed, imageUnlinked, imagesLinked
1359 """
1360
1362 """Checks whether the input images can be linked based on their internal structure.
1363
1364 L{Images} can be linked if
1365 - they have the same dimensions,
1366 - they have the same pixel format,
1367 - they belong to the same L{ImageSet} and
1368 - the image set is not a L{Ptex} image set.
1369
1370 @type Images: list of L{Image}
1371 @rtype: bool
1372 """
1373 pass
1374
1376 """Checks whether the input images can be linked into an existing/new group with the specified group name.
1377
1378 This will check whether the input images, and any existing images linked in the group indexed by the specified groupname, can have their internals linked. It also checks whether any of the images are already part of other link groups, in which case they can not be linked, and this method will return False.
1379
1380 @type Images: list of L{Image}
1381 @param Images: Container of input L{Image} objects.
1382 @type GroupName: str
1383 @param GroupName: The name for the group in which the images need to be linked.
1384 @rtype: bool
1385 @return: True if the images can be linked in a group with the specified group name, and False if not.
1386 @raise RuntimeError: Raised if any of the input images are not valid.
1387 @raise ValueError: Raised if GroupName is an empty string.
1388 @see: L{canLinkImageInternals()}
1389 """
1390 pass
1391
1393 """Checks whether the input patches for the specified image set can be linked based on their underlying image's internal structure.
1394
1395 This is a convenience function which will look up the underlying images for the patches (similar to what can be done by using method mari.GeoEntity.patchImage), and then checks whether the image internals can be linked.
1396
1397 @type Patches: list of L{GeoPatch}
1398 @param Patches: Container of input L{GeoPatch} objects.
1399 @type pImageSet: L{ImageSet}
1400 @param pImageSet: The L{ImageSet} object containing the images for the patches.
1401 @rtype: bool
1402 @return: True if the patches internals can be linked, or False if not.
1403 @raise RuntimeError: Raised if any of the input patches are not valid.
1404 @raise ValueError: Raised if pImageSet isn't a valid L{ImageSet}.
1405 @see: L{canLinkImageInternals()}, L{mari.GeoEntity.patchImage()}
1406 """
1407 pass
1408
1410 """Checks whether the underlying images for the given patches on the specified image set can be linked into a new/existing group with the specified group name.
1411
1412 This is a convenience function which will look up the underlying images for the given patch-image set combination, and then calls L{canLinkImages()}.
1413
1414 @type Patches: list of L{GeoPatch}
1415 @param Patches: Container of input L{GeoPatch} objects.
1416 @type GroupName: str
1417 @param GroupName: The name for the group in which the patches need to be linked.
1418 @type pImageSet: L{ImageSet}
1419 @param pImageSet: The L{ImageSet} object containing the images for the patches.
1420 @rtype: bool
1421 @return: True if the underlying images for the patches can be linked in a group with the specified group name, or False if not.
1422 @raise RuntimeError: Raised if any of the input patches are not valid.
1423 @raise ValueError: Raised if GroupName is an empty string or if pImageSet isn't a valid L{ImageSet}.
1424 @see: L{canLinkImages()}, L{mari.GeoEntity.patchImage()}
1425 """
1426 pass
1427
1429 """Generates a unique name which hasn't yet been used to index a group of linked patches, which you can use to create a uniquely named group of linked patches.
1430
1431 @rtype: str
1432 @return: String containing the unique name.
1433 """
1434 pass
1435
1437 """Emitted when a new link group has been added.
1438
1439 @type GroupName: str
1440 @param GroupName: String name of the group that was added.
1441 @rtype: None
1442 """
1443 pass
1444
1446 """Gets the names of all existing link groups.
1447
1448 @rtype: list of str
1449 @return: Container of strings for the names.
1450 """
1451 pass
1452
1454 """Gets the names of all link groups (if any) which link patch images on the specified image set.
1455
1456 @type pImageSet: L{ImageSet}
1457 @param pImageSet: L{ImageSet} object for which the lookup must be done.
1458 @rtype: list of str
1459 @return: Container of string for the names.
1460 @raise ValueError: Raised if pImageSet isn't a valid L{ImageSet} object.
1461 """
1462 pass
1463
1465 """Emitted when a link group has been removed.
1466
1467 @type GroupName: str
1468 @param GroupName: String name of the group that was renamed.
1469 @rtype: None
1470 """
1471 pass
1472
1474 """Emitted when a link group has been renamed.
1475
1476 @type OldName: str
1477 @param OldName: The previous name.
1478 @type NewName: str
1479 @param NewName: The new name.
1480 @rtype: None
1481 """
1482 pass
1483
1485 """Gets the name of the link group, if any, containing the specified image.
1486
1487 @type Img: L{Image}
1488 @param Img: L{Image} object for which the lookup must be done.
1489 @rtype: str
1490 @return: String name for the group. If L{Img} is not part of any link groups, and empty string is returned.
1491 @raise ValueError: Raised if Img isn't a valid L{Image} object.
1492 """
1493 pass
1494
1496 """Emitted when an L{Image} object has been unlinked.
1497
1498 @type Img: L{Image}
1499 @param Img: L{Image} object which was unlinked.
1500 @rtype: None
1501 """
1502 pass
1503
1504 - def images(self, GroupName):
1505 """Gets the images which are part of the specified link group.
1506
1507 @type GroupName: str
1508 @param GroupName: String name indexing the group which images will be returned.
1509 @rtype: list of L{Image}
1510 @return: Container of L{Image} objects which are part of the specified group. If no no such group exists, an empty container is returned.
1511 @raise ValueError: Raised if GroupName is an empty string.
1512 """
1513 pass
1514
1516 """Emitted when a set of L{Images} object have been linked.
1517
1518 @type Images: list of L{Image}
1519 @param Images: Container of linked L{Image} objects.
1520 @rtype: None
1521 """
1522 pass
1523
1525 """Checks if the image is part of any link groups.
1526
1527 @type Img: L{Image}
1528 @param Img: L{Image} object which must be checked.
1529 @rtype: bool
1530 @return: True if the image has been linked, and False if not.
1531 @raise ValueError: Raised if Img isn't a valid L{Image}.
1532 """
1533 pass
1534
1536 """Check if the image for the patch on the given image set has been linked.
1537
1538 @type Patch: L{GeoPatch}
1539 @param Patch: L{GeoPatch} object which must be checked.
1540 @type pImageSet: L{ImageSet}
1541 @param pImageSet: L{ImageSet} object containing the image indicated by the L{Patch}.
1542 @rtype: bool
1543 @return: True if the patch image is linked, and False if not.
1544 @raise ValueError: Raised if Patch isn't a valid L{GeoPatch} or if pImageSet isn't a valid L{ImageSet}.
1545 @see: L{mari.GeoEntity.patchImage()}, L{isImageLinked()}
1546 """
1547 pass
1548
1550 """Link the input images into a new/existing group with the specified group name.
1551
1552 This method will check the images are linkable by using L{canLinkImages()}, and if so, it will link them. If the images are linked into an existing group, their contents will immediately be updated to match that of other images in the link group.
1553
1554 @type Images: list of L{Image}
1555 @param Images: Container of L{Image} objects to be linked into an existing/new group.
1556 @type GroupName: str
1557 @param GroupName: A name string indexing an existing group, or a name for a new group.
1558 @rtype: None
1559 @raise RuntimeError: Raised if the images could not be linked.
1560 @raise ValueError: Raised if Images is not a list of valid image objects, or if GroupName is an empty string.
1561 @see: L{canLinkImages()}, L{generateUniqueGroupName()}
1562 """
1563 pass
1564
1565 - def linkPatches(self, Patches, GroupName, pImageSet):
1566 """Convenience function to link the images for the patches on the specified image set.
1567
1568 This essentially looks up the images for the patches, and then calls L{linkImages()}.
1569
1570 @type Patches: list of L{GeoPatch}
1571 @param Patches: Container of input L{GeoPatch} objects.
1572 @type GroupName: str
1573 @param GroupName: A name string indexing an existing group, or a name for a new group.
1574 @type pImageSet: L{ImageSet}
1575 @param pImageSet: L{ImageSet} object containing the images indicated by the patches.
1576 @rtype: None
1577 @raise RuntimeError: Raised if the patch images could not be linked.
1578 @raise ValueError: Raised if Patches is not a container of valid patch objects, or if pImageSet isn't a valid L{ImageSet}, or if GroupName is an empty string.
1579 @see: L{linkImages()}, L{mari.GeoEntity.patchImage()}
1580 """
1581 pass
1582
1584 """Convenience method to link the currently selected patches on the specified image set.
1585
1586 @type GroupName: str
1587 @param GroupName: String name indexing an existing group, or a name for a new group, into which the patch images must be linked.
1588 @type pImageSet: L{ImageSet}
1589 @param pImageSet: L{ImageSet} object containing the images which must be linked.
1590 @rtype: None
1591 @raise RuntimeError: Raised if the selected patches could not be linked.
1592 @raise ValueError: Raised if GroupName is an empty string, or if pImageSet isn't a valid L{ImageSet} object.
1593 @see: L{linkPatches()}, L{linkImages()}
1594 """
1595 pass
1596
1598 """Gets the group of linked images of which the input image is part.
1599
1600 @type Img: L{Image}
1601 @param Img: L{Image} object for which the lookup must be done.
1602 @rtype: list of L{Image}
1603 @return: Container of L{Image} objects. The container will be empty if no images are linked against L{Img}.
1604 """
1605 pass
1606
1608 """Gets the group of linked patches of which the input patch is part.
1609
1610 @type Patch: L{GeoPatch}
1611 @param Patch: L{GeoPatch} object for which the lookup must be done.
1612 @type pImageSet: L{ImageSet}
1613 @param pImageSet: L{ImageSet} object which contains the underlying image objects. If L{pImageSet} is None, the current image set is used.
1614 @rtype: list of L{GeoPatch}
1615 @return: Container of L{Image} objects. The container will be empty if no images are linked against Img.
1616 """
1617 pass
1618
1620 """Gets the name of the link group, if any, containing the specified patch image on the specified image set.
1621
1622 @type Patch: L{GeoPatch}
1623 @param Patch: L{GeoPatch} object for which the lookup must be done.
1624 @type pImageSet: L{ImageSet}
1625 @param pImageSet: L{ImageSet} object containing the images.
1626 @rtype: str
1627 @return: String name for the group. If L{Patch} is not part of any link groups, and empty string is returned.
1628 @raise ValueError: Raised if Patch isn't a valid L{GeoPatch} object, or if pImageSet isn't a valid L{ImageSet} object.
1629 """
1630 pass
1631
1632 - def patches(self, GroupName, pImageSet=None):
1633 """Gets the patches which are part of the specified link group on the specified or current image set.
1634
1635 @type GroupName: str
1636 @param GroupName: String name indexing the link group for which pathces must be retrieved.
1637 @type pImageSet: L{ImageSet}
1638 @param pImageSet: L{ImageSet} object which contains the underlying L{Image} objects. If L{pImageSet} is None, the current image set is used for the lookup.
1639 @rtype: list of L{GeoPatch}
1640 @return: Container or L{GeoPatch} objects.
1641 @raise ValueError: Raised if GroupName is an empty string.
1642 @see: L{images()}
1643 """
1644 pass
1645
1647 """Removes a group of linked patch images.
1648
1649 @type GroupName: str
1650 @param GroupName: String name indexing the group which must be removed.
1651 @rtype: None
1652 @raise RuntimeError: Raised if removing the named group failed.
1653 @raise ValueError: Raised if GroupName is an empty string.
1654 """
1655 pass
1656
1658 """Renames a group of linked patch images.
1659
1660 @type OldName: str
1661 @param OldName: String specifying the name of the group.
1662 @type NewName: str
1663 @param NewName: String specifying the new name for the group.
1664 @rtype: None
1665 @raise RuntimeError: Raised if the group does not exist, or if it could not be renamed.
1666 @raise ValueError: Raised if OldName or NewName are invalid strings.
1667 """
1668 pass
1669
1671 """Unlinks the specified image from all other images.
1672
1673 @type Img: L{Image}
1674 @param Img: L{Image} object to unlink.
1675 @rtype: None
1676 @raise RuntimeError: Raised if the Img could not be unlinked.
1677 @raise ValueError: Raised if Img isn't a valid L{Image} object.
1678 """
1679 pass
1680
1682 """Unlinks the image for the patch on the specified image set from all other images.
1683
1684 @type Patch: L{GeoPatch}
1685 @param Patch: The L{GeoPatch} object specifying the image which must be unlinked.
1686 @type pImageSet: L{ImageSet}
1687 @param pImageSet: The L{ImageSet} object containing the image.
1688 @rtype: None
1689 @raise RuntimeError: Raised if the Patch could not be unlinked in pImageSet.
1690 @raise ValueError: Raised if Patch isn't a valid L{GeoPatch} object, or if pImageSet isn't a valid L{ImageSet} object.
1691 @see: L{unlinkImage()}, L{mari.GeoEntity.patchImage()}
1692 """
1693 pass
1694
1696 """Unlinks the patch images for the selected patches on the specified image set.
1697
1698 @type pImageSet: L{ImageSet}
1699 @param pImageSet: L{ImageSet} object containing the images (corresponding to the selected patches) which must be unlinked.
1700 @rtype: None
1701 @raise ValueError: Raised if pImageSet isn't a valid L{ImageSet} object.
1702 """
1703 pass
1704
1705 patch_links = PatchLinksManager()
1709 """Manages retrieval and modification of user preferences.
1710
1711 Mari separates preferences in groups and subgroups. In the preference dialog, a group is represented by a tab, and a subgroup by a group box.
1712
1713 Preference groups and individual preferences are accessed in a similar way to a folder and file structure. For example, calling C{list()} might return C{('Data/', 'Scripts/')} , and their subgroups could be displayed by calling C{list('Data')} .
1714
1715 All preferences have a group and subgroup, so values will always be accessed in the form:
1716
1717 B{Example Code}
1718
1719 >>> import mari
1720 >>> original_autosave_interval = mari.prefs.get('Data/Autosave/autosaveInterval')
1721 >>> mari.prefs.set('Data/Autosave/autosaveInterval',15)
1722 >>> mari.prefs.get('Data/Autosave/autosaveInterval')
1723 15
1724 >>> mari.prefs.set('Data/Autosave/autosaveInterval',original_autosave_interval)
1725
1726 @attention: Dynamically created preferences don't persist between sessions. In order to achieve this you can save and load data using the L{Settings} interface.
1727 """
1728
1729 - def get(self, Path):
1730 """Returns the value of the preference with the given path.
1731
1732 The path matching is case insensitive.
1733
1734 @type Path: str
1735 @param Path: The path to the preference
1736 @rtype: variant
1737 @return: The current value of the preference
1738 """
1739 pass
1740
1741 - def list(self, Path=""):
1742 """Returns a list of the available preferences or preference groups in the given path.
1743
1744 The path matching is case insensitive.
1745
1746 @type Path: str
1747 @param Path: The path to list groups, subgroups, or preferences for
1748 @rtype: list of str
1749 """
1750 pass
1751
1753 """Method used to filter and catch changes to dynamic properties.
1754
1755 @type PropertyName: str
1756 @rtype: str
1757 """
1758 pass
1759
1761 """Deregisters the preference of the given path.
1762
1763 The path matching is case insensitive.
1764
1765 @type Path: str
1766 @param Path: The path to the preference
1767 @rtype: None
1768 @raise ValueError: Raised if no preference with the given path was found.
1769 """
1770 pass
1771
1772 - def set(self, Path, Value):
1773 """Modifies the value of the preference with the given path.
1774
1775 The path matching is case insensitive.
1776
1777 @type Path: str
1778 @param Path: The path to the preference
1779 @type Value: variant
1780 @param Value: The new value to store
1781 @rtype: None
1782 """
1783 pass
1784
1786 """Sets the script to execute if the preference of the given path is changed.
1787
1788 The path matching is case insensitive.
1789
1790 @type Path: str
1791 @param Path: The path to the preference
1792 @type ChangedScript: str
1793 @param ChangedScript: The script to execute if the preference is changed
1794 @rtype: None
1795 @raise ValueError: Raised if no preference with the given path was found.
1796 """
1797 pass
1798
1800 """Sets the value to reset the preference of the given path to.
1801
1802 The path matching is case insensitive.
1803
1804 @type Path: str
1805 @param Path: The path to the preference
1806 @type Default: variant
1807 @param Default: The value to be reset to. A value of 'None' disables reset
1808 @rtype: None
1809 @raise ValueError: Raised if no preference with the given path was found.
1810 """
1811 pass
1812
1814 """Sets the used when presenting the preference of the given path to the user.
1815
1816 The path matching is case insensitive.
1817
1818 @type Path: str
1819 @param Path: The path to the preference
1820 @type DisplayName: str
1821 @param DisplayName: The name used when presenting the preference to the user
1822 @rtype: None
1823 @raise ValueError: Raised if no preference with the given path was found.
1824 """
1825 pass
1826
1828 """Sets the list of available options the preference of the given path is allowed to be set to.
1829
1830 The path matching is case insensitive.
1831
1832 @type Path: str
1833 @param Path: The path to the preference
1834 @type ItemList: list of str
1835 @param ItemList: The list of available options the value is allowed to be set to
1836 @rtype: None
1837 @raise ValueError: Raised if no preference with the given path was found or it's not supported on the type.
1838 """
1839 pass
1840
1842 """Sets the allowed range of the preference of the given path.
1843
1844 The path matching is case insensitive.
1845
1846 @type Path: str
1847 @param Path: The path to the preference
1848 @type Min: variant
1849 @param Min: The minimum value possible
1850 @type Max: variant
1851 @param Max: The maximum value possible
1852 @rtype: None
1853 @raise ValueError: Raised if no preference with the given path was found or it's not supported on the type.
1854 """
1855 pass
1856
1858 """Sets the step size used when incrementing the preference of the given path.
1859
1860 The path matching is case insensitive.
1861
1862 @type Path: str
1863 @param Path: The path to the preference
1864 @type Step: variant
1865 @param Step: The step size used when incrementing the value
1866 @rtype: None
1867 @raise ValueError: Raised if no preference with the given path was found or it's not supported on the type.
1868 """
1869 pass
1870
1871 prefs = Preferences()
1872
1873
1874 -class Clock(object):
1875 """Controls for Mari's internal animation clock.
1876
1877 Using this class the user can control playback of animation in Mari. Various things can be animated in Mari, including geometry, cameras, and textures. The frame range may be set to any required values, and animated scene elements will clamp their animation to the frames they have available. The clock can be run forwards or backwards at different frame rates. The behavior for when the end of the frame range is reached can also be customized, so playback can stop, loop, or bounce.
1878 B{Example Code}
1879
1880 >>> # This example obtains the current animation frame
1881 >>> import mari
1882 >>> current_frame = mari.clock.frame()
1883
1884 @cvar LOOP: Return to the start of the frame range and continue playing.
1885 @cvar BOUNCE: Play in reverse back to the start of the frame range, and then resume forward playback.
1886 @cvar STOP: Stop playback.
1887 @group Signals: frameChanged, frameRateChanged, playingChanged, rangeChanged
1888 """
1889
1891 """Directions of animation playback.
1892 @note: These values are exposed in the parent class, but are also documented here for convenience.
1893 """
1894 BACKWARDS = -1
1895 FORWARDS = +1
1896
1897 BACKWARDS = -1
1898 FORWARDS = +1
1899
1901 """These are the types of behavior available for when the end of the frame range is reached.
1902 @cvar LOOP: Return to the start of the frame range and continue playing.
1903 @cvar BOUNCE: Play in reverse back to the start of the frame range, and then resume forward playback.
1904 @cvar STOP: Stop playback.
1905 @note: These values are exposed in the parent class, but are also documented here for convenience.
1906 """
1907 LOOP = 0
1908 BOUNCE = 1
1909 STOP = 2
1910
1911 LOOP = 0
1912 BOUNCE = 1
1913 STOP = 2
1914
1916 """Returns the current frame number.
1917
1918 @rtype: int
1919 @return: The current frame number
1920 @see: L{setFrame()}
1921 """
1922 pass
1923
1925 """This is emitted when the frame number changes.
1926
1927 @type Frame: int
1928 @param Frame: The new frame number
1929 @rtype: None
1930 """
1931 pass
1932
1934 """Returns the number of frames in the current frame range.
1935
1936 @rtype: int
1937 @return: The number of frames in the current frame range
1938 """
1939 pass
1940
1942 """Returns the animation playback frame rate, in FPS.
1943
1944 @rtype: int
1945 @return: The current frame rate, in frames per second.
1946 @see: L{setFrameRate()}
1947 """
1948 pass
1949
1951 """This is emitted when the frame rate changes.
1952
1953 @type NewFps: int
1954 @param NewFps: The new frame rate, in frames per second.
1955 @rtype: None
1956 """
1957 pass
1958
1960 """Returns the number of animation loops that have been completed.
1961
1962 When in bounce playback mode, playing all frames forwards and then all in reverse counts as one loop.
1963
1964 @rtype: int
1965 @return: The number of animation loops that have been completed.
1966 @see: L{BOUNCE}
1967 """
1968 pass
1969
1971 """Starts animation playback.
1972
1973 @type Direction: L{PlayDirection}
1974 @param Direction: Indicates whether to play forwards (the default) or backwards
1975 @rtype: None
1976 """
1977 pass
1978
1980 """Indicates whether animation playback is active.
1981
1982 @rtype: bool
1983 @return: True if the clock is currently playing
1984 """
1985 pass
1986
1988 """This is emitted when animation starts or stops.
1989
1990 @type IsPlaying: bool
1991 @param IsPlaying: True when playing, or False when stopped
1992 @rtype: None
1993 """
1994 pass
1995
1997 """This is emitted when the frame range changes.
1998
1999 @type Start: int
2000 @param Start: The start frame of the new range
2001 @type End: int
2002 @param End: The end frame of the new range
2003 @rtype: None
2004 """
2005 pass
2006
2008 """Indicates how the clock handles reaching the end of the frame range during playback.
2009
2010 @rtype: L{RepeatType}
2011 @return: The current repeating behavior
2012 @see: L{setRepeatType()}
2013 """
2014 pass
2015
2017 """Resets all the internal clock values to sensible defaults.
2018
2019 @rtype: None
2020 """
2021 pass
2022
2024 """Rewinds to the first frame.
2025
2026 @rtype: None
2027 """
2028 pass
2029
2031 """Sets the current frame.
2032
2033 @type Frame: int
2034 @param Frame: The new frame number
2035 @rtype: None
2036 @see: L{frame()}
2037 """
2038 pass
2039
2041 """Sets the animation frame range.
2042
2043 Animation will run between the start and end of the range.
2044
2045 @type Start: int
2046 @param Start: The start frame of the new range
2047 @type End: int
2048 @param End: The end frame of the new range
2049 @rtype: None
2050 """
2051 pass
2052
2054 """Sets the animation playback frame rate, in FPS.
2055
2056 @type fps: int
2057 @param fps: The new frame rate, in frames per second.
2058 @rtype: None
2059 @see: L{frameRate()}
2060 """
2061 pass
2062
2064 """Sets how the clock should handle reaching the end of the frame range during playback.
2065
2066 @type Type: L{RepeatType}
2067 @param Type: The new repeating behavior
2068 @rtype: None
2069 @see: L{repeatType()}
2070 """
2071 pass
2072
2074 """Sets the frame rate of the source material, in FPS.
2075
2076 @type Fps: int
2077 @param Fps: The frame rate, in frames per second, that the material in the current project should be played at. For film this is generally 24 FPS.
2078 @rtype: None
2079 @see: L{sourceFrameRate()}
2080 """
2081 pass
2082
2084 """Returns the frame rate of the source material, in FPS.
2085
2086 @rtype: int
2087 @return: The frame rate, in frames per second, that material in the current project is played at
2088 @see: L{setSourceFrameRate()}
2089 """
2090 pass
2091
2093 """Returns the start frame.
2094
2095 @rtype: int
2096 @return: The starting frame of the current frame range
2097 """
2098 pass
2099
2101 """Steps back to the frame before the current one.
2102
2103 @rtype: None
2104 """
2105 pass
2106
2108 """Steps forward to the frame after the current one.
2109
2110 @rtype: None
2111 """
2112 pass
2113
2115 """Stops animation playback.
2116
2117 @rtype: None
2118 """
2119 pass
2120
2122 """Returns the end frame.
2123
2124 @rtype: int
2125 @return: The end frame of the current frame range
2126 """
2127 pass
2128
2130 """Returns the animation playback time in HH:MM:SS:MS format.
2131
2132 @rtype: str
2133 @return: A string representation of the current animation playback time. When at the first frame, this will be "00:00:00:00".
2134 """
2135 pass
2136
2140
2143 """This object handles basic operations to be performed on the entire application.
2144
2145 B{Example Code}
2146
2147 >>> # This example prints out "Hello World" to the application log
2148 >>> import mari
2149 >>> mari.app.log("Hello World")
2150
2151 @group Signals: autosaveReset, autosaveTriggered, backgroundJobsRunning, canceledProcessing, endingProcessing, exiting, fullScreenChanging, onProgress, progressDescriptionChanged, startingProcessing, toolBarsCreated
2152 """
2153
2162
2163 LEFT_TOOLBAR_AREA = 0x1
2164 RIGHT_TOOLBAR_AREA = 0x2
2165 TOP_TOOLBAR_AREA = 0x4
2166 BOTTOM_TOOLBAR_AREA = 0x8
2167
2169 """Sets the desktop focus to the Mari window.
2170
2171 The standard focus rules for the OS apply. For example, on Windows the application must have permission to set the foreground window; otherwise, it flashes the taskbar icon instead.
2172
2173 @rtype: None
2174 @see: U{MSDN: SetForegroundWindow() (for Windows)<http://msdn.microsoft.com/en-us/library/windows/desktop/ms633539%28v=vs.85%29.aspx>}
2175 """
2176 pass
2177
2178 - def addTab(self, Name, Widget):
2179 """Adds a custom tab to the main window.
2180
2181 Users can add custom tabs to the tab bar on the main window. The user is responsible for enabling and disabling these tabs when required.
2182
2183 @type Name: str
2184 @param Name: The name of the new tab. This will appear in the tab bar
2185 @type Widget: QWidget
2186 @param Widget: The widget for the new tab
2187 @rtype: None
2188 @raise ValueError: Raised if the name or widget were invalid.
2189 @see: L{removeTab()}
2190 """
2191 pass
2192
2194 """This is emitted when the application autosave is reset.
2195
2196 @rtype: None
2197 """
2198 pass
2199
2201 """This is emitted when the application autosave is triggered.
2202
2203 We call the autosave manager several times at various places throughout the application. The autosave manager is responsible to maintain the current time and when the autosave should next happen and update the timer accordingly. This means that we could call the autosave manager a hundred times and only one call will get through at the scheduled time. This makes the autosaving efficient. To that end, if the autosave call is not completed (because it's not yet time), we return the scheduled time as a string. Otherwise, if the call does go through and an autosave is performed, we return an empty string here.
2204
2205 @type ScheduledTime: str
2206 @param ScheduledTime: This is the time when the autosave is scheduled next.
2207 @rtype: None
2208 """
2209 pass
2210
2212 """Returns the caption for the background job ID.
2213
2214 @type JobID: qint64
2215 @param JobID: The ID of the job to query the caption.
2216 @rtype: str
2217 @return: The caption for the background job ID.
2218 """
2219 pass
2220
2222 """Returns the list of job IDs for background jobs.
2223
2224 @rtype: list of qint64
2225 @return: The list of job IDs for background jobs.
2226 """
2227 pass
2228
2230 """This is emitted when Mari begins and end background processing of jobs.
2231
2232 Mari can run multiple jobs in the background while the user is working. These can be tasks like exporting or importing images or performing long running processing. This signal informs the user when Mari starts or end processing background tasks. This is only emitted as True when Mari goes from a state where no background jobs are running to running background jobs. If Mari is currently running background jobs and new jobs are added this signal is not emitted.
2233 C{#Print out a message when background jobs start or stop}
2234
2235 C{def printRunning(a):}
2236
2237 C{print 'Background Job Running ', a}
2238
2239 C{mari.utils.connect(mari.app.backgroundJobsRunning, printRunning)}
2240
2241 @type AreJobsRunning: bool
2242 @param AreJobsRunning: True if background jobs are now scheduled, or False if there are no more background jobs
2243 @rtype: None
2244 """
2245 pass
2246
2248 """This is emitted when the user cancels a long-running job.
2249
2250 Note that this is the signal version. The matching function call is L{wasProcessingCanceled()}.
2251
2252 Avoid immediately showing GUI elements in response to this signal. The application will not be processing user input at this stage, and may become unresponsive if a blocking element (such as a message box) is displayed.
2253
2254 @rtype: None
2255 @see: L{startingProcessing}, L{endingProcessing}, L{wasProcessingCanceled()}
2256 """
2257 pass
2258
2260 """Get the current height of the canvas area.
2261
2262 @rtype: int
2263 """
2264 pass
2265
2267 """(Deprecated) Get the current size of the canvas area
2268
2269 @rtype: QSize
2270 @deprecated: Please use L{canvasWidth()} and L{canvasHeight()} instead.
2271 """
2272 pass
2273
2275 """Get the current width of the canvas area.
2276
2277 @rtype: int
2278 """
2279 pass
2280
2282 """Captures a pixmap of the desktop and returns it.
2283
2284 @rtype: QPixmap
2285 @return: A QPixmap containing the desktop image
2286 """
2287 pass
2288
2290 """Clears the script console output.
2291
2292 @rtype: None
2293 """
2294 pass
2295
2297 """Indicates whether the command port is currently enabled.
2298
2299 @rtype: bool
2300 @return: True if the command port is ready to accept connections, or False if not
2301 """
2302 pass
2303
2305 """Returns the port number that the command port will accept connections on.
2306
2307 @rtype: int
2308 @see: L{enableCommandPort()}, L{setCommandPortNumber()}
2309 """
2310 pass
2311
2327
2345
2355
2357 """Enables or disables the command port.
2358
2359 After enabling, Mari will accept connections on the specific command port.
2360
2361 @type Enabled: bool
2362 @rtype: None
2363 @see: L{commandPortNumber()}
2364 """
2365 pass
2366
2368 """This is emitted when all long-running jobs have finished.
2369
2370 Note that startingProcessing is emitted for each job that begins, but endingProcessing is only emitted once, when all active jobs have completed.
2371
2372 @rtype: None
2373 @see: L{canceledProcessing}, L{startingProcessing}
2374 """
2375 pass
2376
2377 - def exit(self, ResultCode=0, ConfirmIfProjectModified=True):
2378 """Exits Mari.
2379
2380 This is the same as L{quit()}, but allows the caller to specify a result code.
2381
2382 @type ResultCode: int
2383 @param ResultCode: The result code to return to the application's caller.
2384 @type ConfirmIfProjectModified: bool
2385 @param ConfirmIfProjectModified: When set to True (the default), a confirmation dialog will be shown if a project is open and needs saving. When set to False, this exits without confirmation.
2386 @rtype: None
2387 @note: When running in terminal mode, the project will always be closed without confirmation.
2388 """
2389 pass
2390
2392 """This is emitted just before Mari exits.
2393
2394 The signal will only be emitted if the user accepts any confirmation dialogs (such as the save project before closing dialog). If so, the project will be closed, and then the signal will be emitted before any further shut down processing is performed.
2395
2396 For example, it is safe to perform project maintenance operations in response to this signal if desired.
2397
2398 @rtype: None
2399 """
2400 pass
2401
2410
2412 """This is emitted when the full screen state of the main window is about to change.
2413
2414 @type FullScreen: bool
2415 @param FullScreen: True if the main window is becoming full screen, or False if it is becoming windowed.
2416 @rtype: None
2417 """
2418 pass
2419
2421 """Returns the geometry of the main window.
2422
2423 @rtype: QRect
2424 @return: The geometry of the main window.
2425 @see: L{setGeometry()}
2426 """
2427 pass
2428
2430 """Returns whether any commands have been received by the command port but not yet executed.
2431
2432 @rtype: bool
2433 @return: True if any commands are pending, or False if not
2434 """
2435 pass
2436
2438 """Indicates whether the app is running in a restricted version (i.e, Minion or non commercial mode).
2439
2440 This indicates whether the application is run in a restricted mode (Indie or non commercial mode).
2441
2442 @rtype: bool
2443 @return: True if the app has restrictions.
2444 """
2445 pass
2446
2448 """Indicates whether the app is running in terminal mode.
2449
2450 This includes interactive terminal mode ("mari -t") and execute mode ("mari -x").
2451
2452 @rtype: bool
2453 @return: True if the app is in terminal mode, or False if not.
2454 """
2455 pass
2456
2458 """Returns whether the job of the given job ID has finished running in the background.
2459
2460 @type JobID: qint64
2461 @param JobID: The ID of the job to check the status.
2462 @rtype: bool
2463 @return: Whether the job of the given job ID has finished running in the background.
2464 """
2465 pass
2466
2468 """Returns whether the main window is set to full screen.
2469
2470 @rtype: bool
2471 @return: True if the main window is covering the full screen, or False if not.
2472 """
2473 pass
2474
2476 """Returns whether the main window is maximized.
2477
2478 @rtype: bool
2479 @return: True if the main window is maximized, or False if not.
2480 """
2481 pass
2482
2484 """Returns whether the main window is minimized.
2485
2486 @rtype: bool
2487 @return: True if the main window is minimized, or False if not.
2488 """
2489 pass
2490
2492 """Returns whether or not a long processing operation is active.
2493
2494 This will perform a poll of the processing state. It is advisable to use the L{startingProcessing()} and L{endingProcessing()} signals to track processing operations in a non-blocking way.
2495
2496 @rtype: bool
2497 @return: True if a long processing operation is active or False otherwise.
2498 @see: L{progress()}, L{endingProcessing()}, L{progressDescription()}, L{startingProcessing()}
2499 """
2500 pass
2501
2503 """Returns whether the application is currently running.
2504
2505 This is currently only for internal use.
2506
2507 @rtype: bool
2508 @return: True when Mari is running (currently in all practical cases for users), or False in some special internal cases such as documentation generation.
2509 """
2510 return False
2511
2513 """Indicates whether the app is running in safe mode at a level where we want to bypass any user environment resource key values settings.
2514
2515 @rtype: bool
2516 @return: True if the app is in safe mode, or False if not.
2517 """
2518 pass
2519
2520 - def log(self, Message):
2521 """Writes the given message to the log file for the application.
2522
2523 In verbose mode, the message will also appear in the terminal, in the same way as many application debug messages.
2524
2525 @type Message: str
2526 @param Message: The message to write
2527 @rtype: None
2528 """
2529 pass
2530
2532 """Maximizes the main window.
2533
2534 @rtype: None
2535 """
2536 pass
2537
2539 """Minimizes the main window.
2540
2541 @rtype: None
2542 """
2543 pass
2544
2546 """Returns he number of steps to be performed in the current long running processing operation.
2547
2548 This is only valid if a processing operation is active.
2549
2550 @rtype: int
2551 @return: The number of steps to be performed in the processing.
2552 @raise RuntimeError: Raised if there is no processing operation active.
2553 @see: L{progress()}, L{endingProcessing()}, L{progressDescription()}, L{startingProcessing()}
2554 """
2555 pass
2556
2558 """This is emitted to update the progress of a long-running job.
2559
2560 @type Progress: int
2561 @param Progress: The progress of the currently running job, as an integer between 0 and NumSteps, inclusive.
2562 @rtype: None
2563 """
2564 pass
2565
2567 """Processes events such as redrawing the screen and updating the GUI.
2568
2569 This is for use during long running operations.
2570
2571 This function is called automatically by many of the processing functions, such as L{setProgress()}. If you perform other long-running operations, or do not call L{setProgress()} very often, consider calling this function manually to improve the interactivity of the application.
2572
2573 @rtype: None
2574 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgress()}, L{setProgressDescription()}, L{stopProcessing()}, L{stepProgress()}, L{startProcessing()}
2575 """
2576 pass
2577
2579 """Returns the progress of the current long running processing operation.
2580
2581 This is only valid if a processing operation is active.
2582
2583 @rtype: int
2584 @return: The number of steps completed in this processing operation.
2585 @raise RuntimeError: Raised if there is no processing operation active.
2586 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgress()}, L{setProgressDescription()}, L{stopProcessing()}, L{processEvents()}, L{stepProgress()}, L{startProcessing()}
2587 """
2588 pass
2589
2591 """Returns the process description of the current long running processing operation.
2592
2593 This is only valid if a processing operation is active.
2594
2595 @rtype: str
2596 @return: The user-readable description of the process.
2597 @raise RuntimeError: Raised if there is no processing operation active.
2598 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgressDescription()}, L{stopProcessing()}, L{processEvents()}, L{stepProgress()}, L{startProcessing()}
2599 """
2600 pass
2601
2603 """This is emitted to update the description of a long-running job.
2604
2605 @type NewDescription: str
2606 @param NewDescription: A description of the job for display.
2607 @rtype: None
2608 """
2609 pass
2610
2611 - def quit(self, ConfirmIfProjectModified=True):
2612 """Quits Mari.
2613
2614 This is the same as L{exit()}.
2615
2616 @type ConfirmIfProjectModified: bool
2617 @param ConfirmIfProjectModified: When set to True (the default), a confirmation dialog will be shown if a project is open and needs saving. When set to False, this exits without confirmation.
2618 @rtype: None
2619 @note: When running in terminal mode, the project will always be closed without confirmation.
2620 """
2621 pass
2622
2624 """Removes a custom tab from the main window.
2625
2626 @type Name: str
2627 @param Name: The name of the tab to remove
2628 @rtype: None
2629 @raise ValueError: Raised if no tab with the given name was found
2630 @see: L{addTab()}, L{tabNames()}
2631 """
2632 pass
2633
2635 """Restores the main window to the size it was before minimize, maximize or full screen.
2636
2637 @rtype: None
2638 """
2639 pass
2640
2642 """Restores cursor.
2643
2644 Restores the cursor after calling setBusyCursor.
2645
2646 @rtype: None
2647 @see: setBusyCursor()
2648 """
2649 pass
2650
2652 """Resumes a temporarily suspended long processing operation.
2653
2654 Call this function as soon as the user interaction that the processing was suspended for has been performed.
2655
2656 @rtype: None
2657 @see: L{suspendProcessing()}
2658 """
2659 pass
2660
2662 """Sets the currently active, visible tab.
2663
2664 @type Name: str
2665 @param Name: The name of the tab to make active
2666 @rtype: None
2667 @raise ValueError: Raised if no tab with the given name was found
2668 @see: L{tabNames()}
2669 """
2670 pass
2671
2673 """Sets the port number that the command port should accept connections on.
2674
2675 This will close any existing connections and restart the command port on a new socket.
2676
2677 @type Number: int
2678 @rtype: None
2679 @see: L{commandPortNumber()}
2680 """
2681 pass
2682
2684 """Set the current canvas area to a fixed size.
2685
2686 This fixes the canvas area to a certain size, preventing the user from modifying it in any way, until unfixed. Passing in an invalid size will unfix the canvas area and enable the user to modify the size again.
2687
2688 @type Width: int
2689 @param Width: The width to fix the canvas area too, or zero or less to unfix.
2690 @type Height: int
2691 @param Height: The height to fix the canvas area too, or zero or less to unfix.
2692 @rtype: None
2693 """
2694 pass
2695
2697 """Sets the full screen state of the main window.
2698
2699 @type FullScreen: bool
2700 @param FullScreen: True will set Mari to full screen mode; False will set it to normal windowed behavior.
2701 @rtype: None
2702 """
2703 pass
2704
2706 """Sets the geometry of the main window.
2707
2708 @type Geom: QRect
2709 @param Geom: The new geometry of the main window.
2710 @rtype: None
2711 @see: L{geometry()}
2712 """
2713 pass
2714
2716 """Sets the status of the Nuke connection indicator.
2717
2718 @type Active: bool
2719 @param Active: True to show the indicator, or False to hide it
2720 @type ConnectionInfo: str
2721 @param ConnectionInfo: Text info describing the connection. This will be displayed in the status bar as "Connected to Nuke" followed by the given text
2722 @rtype: None
2723 """
2724 pass
2725
2727 """Provides an indication of the progress of a long running processing operation.
2728
2729 This will update the status bar on the main window.
2730
2731 This function will automatically call L{processEvents()} once to ensure that the change to the status bar is displayed to the user.
2732
2733 @type Progress: int
2734 @param Progress: The number of steps completed in this processing operation. This should be at least zero and at most the value passed as NumSteps to L{startProcessing()}.
2735 @rtype: None
2736 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgressDescription()}, L{stopProcessing()}, L{progress()}, L{processEvents()}, L{stepProgress()}, L{startProcessing()}
2737 """
2738 pass
2739
2741 """Sets the process description displayed in the status bar.
2742
2743 This will update the status bar on the main window replacing the description provided to L{startProcessing()}.
2744
2745 This function will automatically call L{processEvents()} once to ensure that the change to the status bar is displayed to the user.
2746
2747 @type Description: str
2748 @param Description: A user-readable description of the process - e.g. "Processing Data". This will be displayed in the status bar.
2749 @rtype: None
2750 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{stopProcessing()}, L{processEvents()}, L{progressDescription()}, L{stepProgress()}, L{startProcessing()}
2751 """
2752 pass
2753
2755 """Switches cursor to Qt::WaitCursor.
2756
2757 Switches cursor to Qt::WaitCursor. Restore by calling restoreCursor.
2758
2759 @rtype: None
2760 @see: L{restoreCursor()}
2761 """
2762 pass
2763
2765 """Registers the start of a long processing operation.
2766
2767 Mari gives the user feedback on the status of long running processes. This method indicates the start of one of these processes. It is a good idea to always start this when processing data. Mari will display a busy icon, and calls to L{setProgress()} will update a status bar in the bottom right corner of the application GUI.
2768
2769 Calls to L{startProcessing()} must always be followed by a L{stopProcessing()} call. It may also be useful to call L{processEvents()} during your processing loop to give the application time to update the GUI.
2770
2771 This function will automatically call L{processEvents()} once to ensure that the new status bar is displayed to the user.
2772
2773 @type Description: str
2774 @param Description: A user-readable description of the process - e.g. "Processing Data". This will be displayed in the status bar.
2775 @type NumSteps: int
2776 @param NumSteps: The number of steps to be performed in the processing. Calls to setProgress should indicate the number of steps completed.
2777 @type CanCancel: bool
2778 @param CanCancel: Set this to True if the action being executed can be safely canceled
2779 @rtype: None
2780 @attention: If run in the script editor, this function will cause Mari to become non-interactive until L{stopProcessing()} is called, so make sure you call it as part of your script or you will not be able to enter any further commands.
2781 @see: L{suspendProcessing()}, L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgress()}, L{setProgressDescription()}, L{stopProcessing()}, L{processEvents()}, L{stepProgress()}, L{numProcessingSteps()}
2782 """
2783 pass
2784
2786 """This is emitted when a long-running job starts.
2787
2788 @type Operation: str
2789 @param Operation: A description of the job for display.
2790 @type NumSteps: int
2791 @param NumSteps: The number of steps involved in this job
2792 @rtype: None
2793 @see: L{canceledProcessing}, L{endingProcessing}
2794 """
2795 pass
2796
2798 """Moves forward the progress indicator of a long running processing operation by one step.
2799
2800 This will update the status bar on the main window.
2801
2802 This function will automatically call L{processEvents()} once to ensure that the change to the status bar is displayed to the user.
2803
2804 @rtype: None
2805 @raise RuntimeError: Raised if the current progress is already at 100%.
2806 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgress()}, L{stopProcessing()}, L{processEvents()}, L{setProgressDescription()}, L{startProcessing()}
2807 """
2808 pass
2809
2811 """Registers the end of a long processing operation.
2812
2813 This should always be called after L{startProcessing()}.
2814
2815 @rtype: None
2816 @see: L{canceledProcessing()}, L{wasProcessingCanceled()}, L{setProgress()}, L{setProgressDescription()}, L{processEvents()}, L{stepProgress()}, L{startProcessing()}
2817 """
2818 pass
2819
2821 """Temporarily suspends a long processing operation.
2822
2823 Normally, long-running processing operations ignore mouse and keyboard input from the user while running. Use this function to suspend the processing temporarily, and allow mouse and keyboard input again, if input is required from the user - such as in the case of a message box querying the user for action.
2824
2825 Make sure you call L{resumeProcessing()} again as soon as possible, or the status bar will not be updated, and users may be able to interfere with processing operations by making changes through the GUI at the same time.
2826
2827 @rtype: None
2828 @see: L{resumeProcessing()}
2829 """
2830 pass
2831
2833 """Lists the available tabs in the main window.
2834
2835 @rtype: list of str
2836 @see: L{setActiveTab()}, L{removeTab()}, L{addTab()}
2837 """
2838 pass
2839
2841 """Toggle the main window between full screen and windowed states.
2842
2843 @rtype: None
2844 """
2845 pass
2846
2856
2863
2865 """Returns an object that contains version information for Mari.
2866
2867 @rtype: L{AppVersion}
2868 """
2869 pass
2870
2872 """Checks to see if the user has chosen to cancel a long-running process.
2873
2874 Users can cancel many long-running processes by clicking the 'X' button on the progress bar when one is present, or by pressing the "Escape" key.
2875
2876 Note that this is the function version. There is a matching signal called L{canceledProcessing()}.
2877
2878 @rtype: bool
2879 @return: True if the current processing should be canceled, or False otherwise
2880 @note: This function should be called sporadically, because calling this method may also call L{processEvents()} and slow down processing if called continuously.
2881 @see: L{setProgress()}, L{setProgressDescription()}, L{stopProcessing()}, L{canceledProcessing}, L{processEvents()}, L{stepProgress()}, L{startProcessing()}
2882 """
2883 pass
2884
2885 app = Application()
2889 """Objects of this class holds 1-dimensional look up table curve.
2890
2891 Curve is defined from a set of control points.
2892
2893 Objects of this class often appears as parameters of shaders and layers
2894
2895 B{Example Code}
2896
2897 >>> # This example creates a "Brightness Lookup" layer and obtains its "Map" parameter, which is of LookUpTable type
2898 >>> import mari
2899 >>> layer = mari.geo.current().currentChannel().createAdjustmentLayer("Test", "Filter/Brightness Lookup")
2900 >>> lut = layer.getPrimaryAdjustmentParameter("Map")
2901 """
2902
2904 """Returns the list of control points as a list of L{VectorN}.
2905
2906 @rtype: list of L{VectorN}
2907 @return: The list of control points as a list of L{VectorN}
2908 @see: L{setControlPoints()}
2909 """
2910 pass
2911
2913 """Returns the string representation of the control points of the look up table.
2914
2915 @rtype: str
2916 @return: The string representation of the contol points of the look up table
2917 """
2918 pass
2919
2921 """Inverts the look up curve.
2922
2923 @rtype: None
2924 """
2925 pass
2926
2928 """Returns whether values outside of [0,1] are clamped.
2929
2930 @rtype: bool
2931 @return: Whether values outside of [0,1] are clamped
2932 """
2933 pass
2934
2936 """Sets whether values outside of [0,1] are clamped.
2937
2938 @type Clamped: bool
2939 @param Clamped: If True, values outside of [0,1] are clamped
2940 @rtype: None
2941 """
2942 pass
2943
2945 """Sets the control points from a given list of L{VectorN}.
2946
2947 @type ControlPoints: list of L{VectorN}
2948 @param ControlPoints: The list of control points of L{VectorN}
2949 @rtype: None
2950 @raise ValueError: Raised if the ControlPoints is invalid.
2951 @see: L{controlPoints()}
2952 """
2953 pass
2954
2956 """Sets the control points from given string representation of look up table.
2957
2958 @type ControlPointsString: str
2959 @param ControlPointsString: The string reprentation of control points to set
2960 @rtype: None
2961 """
2962 pass
2963
2964 - def setLinear(self, ValueAtZero, ValueAtOne):
2965 """Sets the look up table curve to a linear curve.
2966
2967 @type ValueAtZero: float
2968 @param ValueAtZero: The value to map zero to
2969 @type ValueAtOne: float
2970 @param ValueAtOne: The value to map one to
2971 @rtype: None
2972 """
2973 pass
2974
2976 """Sets to the settings specified by the given components.
2977
2978 @rtype: L{LookUpTable}
2979 """
2980 pass
2981
2984 """Stores a list of files and directories that can be used for custom attributes.
2985
2986 B{Example Code}
2987
2988 >>> # This example creates a FileList object with a sample file path
2989 >>> import mari
2990 >>> file_list = mari.FileList(mari.FileList.TYPE_SINGLE_FILE)
2991 >>> file_list.append("/tmp/Hello.txt")
2992
2993 @cvar TYPE_FILE: Supports file paths.
2994 @cvar TYPE_DIRECTORY: Supports directory paths.
2995 @cvar TYPE_SINGLE_FILE: Just support a single file.
2996 @cvar TYPE_SAVE_FILE: Supports a file for saving.
2997 @cvar TYPE_CHOOSE_FILE: Choose from the list of given files.
2998 @cvar TYPE_SINGLE_DIRECTORY: Supports a single directory.
2999 @cvar TYPE_FILE_AND_DIRECTORY: Supports files and directories.
3000 """
3001
3003 """This defines the type of contents the file list supports.
3004 @cvar TYPE_FILE: Supports file paths.
3005 @cvar TYPE_DIRECTORY: Supports directory paths.
3006 @cvar TYPE_SINGLE_FILE: Just support a single file.
3007 @cvar TYPE_SAVE_FILE: Supports a file for saving.
3008 @cvar TYPE_CHOOSE_FILE: Choose from the list of given files.
3009 @cvar TYPE_SINGLE_DIRECTORY: Supports a single directory.
3010 @cvar TYPE_FILE_AND_DIRECTORY: Supports files and directories.
3011 @note: These values are exposed in the parent class, but are also documented here for convenience.
3012 """
3013 TYPE_FILE = 0
3014 TYPE_DIRECTORY = 1
3015 TYPE_SINGLE_FILE = 2
3016 TYPE_SAVE_FILE = 3
3017 TYPE_CHOOSE_FILE = 4
3018 TYPE_SINGLE_DIRECTORY = 5
3019 TYPE_FILE_AND_DIRECTORY = 6
3020
3021 TYPE_FILE = 0
3022 TYPE_DIRECTORY = 1
3023 TYPE_SINGLE_FILE = 2
3024 TYPE_SAVE_FILE = 3
3025 TYPE_CHOOSE_FILE = 4
3026 TYPE_SINGLE_DIRECTORY = 5
3027 TYPE_FILE_AND_DIRECTORY = 6
3028
3030 """Returns True if the file list accepts non-existent files.
3031
3032 @rtype: bool
3033 @return: Whether the file list accepts non-existent files
3034 @see: L{setAcceptNonExisting()}
3035 """
3036 pass
3037
3039 """Inserts a file at the end of the list.
3040
3041 @type File: str
3042 @param File: The file to append
3043 @rtype: None
3044 """
3045 pass
3046
3047 - def at(self, Index):
3048 """Returns the file at the given index in the list.
3049
3050 @type Index: int
3051 @param Index: The index of the file to return
3052 @rtype: str
3053 @return: The file at the given index
3054 """
3055 pass
3056
3058 """Removes all files from the list.
3059
3060 @rtype: None
3061 """
3062 pass
3063
3065 """Returns True if the list contains an occurrence of the file, otherwise returns False.
3066
3067 @type File: str
3068 @param File: The file to search for
3069 @rtype: bool
3070 @return: Whether the list contains an occurrence of the given file
3071 """
3072 pass
3073
3075 """Returns the number of files in the list.
3076
3077 @rtype: int
3078 @return: The number of files in the list
3079 """
3080 pass
3081
3083 """Returns the default directory.
3084
3085 @rtype: str
3086 @return: The default directory
3087 @see: L{setDefaultDirectory()}
3088 """
3089 pass
3090
3092 """Returns the filter used in selecting files.
3093
3094 @rtype: str
3095 @return: The file filter
3096 @see: L{setFilter()}
3097 """
3098 pass
3099
3100 - def insert(self, Index, File):
3101 """Inserts the file at the given index in the list.
3102
3103 If index is 0, the value is prepended to the list. If index is the size of the list, the file is appended to the list.
3104
3105 @type Index: int
3106 @param Index: The position to insert the file at
3107 @type File: str
3108 @param File: The file to insert
3109 @rtype: None
3110 """
3111 pass
3112
3114 """Returns True if the list contains no files, otherwise returns False.
3115
3116 @rtype: bool
3117 @return: Whether the list contains no files
3118 """
3119 pass
3120
3122 """Returns the path key used by the widgets and dialogs for default path saving.
3123
3124 @rtype: str
3125 @return: The path key used for default path saving
3126 @see: L{setPathKey()}
3127 """
3128 pass
3129
3131 """Returns the currently picked file.
3132
3133 @rtype: str
3134 @return: The currently picked file
3135 @see: L{setPickedFile()}
3136 """
3137 pass
3138
3140 """Removes the file at the given index.
3141
3142 @type Index: int
3143 @param Index: The index of the file to remove
3144 @rtype: None
3145 """
3146 pass
3147
3149 """Sets whether the file list should accept non-existent files.
3150
3151 @type AcceptNonExisting: bool
3152 @param AcceptNonExisting: Whether the file list accepts non-existent files
3153 @rtype: None
3154 @see: L{acceptNonExisting()}
3155 """
3156 pass
3157
3159 """Sets the default directory to open to (only if this is of type directory).
3160
3161 @type DefaultDirectory: str
3162 @param DefaultDirectory: The default directory to open to
3163 @rtype: None
3164 @see: L{defaultDirectory()}
3165 """
3166 pass
3167
3169 """Sets the filter used in selecting files.
3170
3171 @type Filter: str
3172 @param Filter: The file filter
3173 @rtype: None
3174 @see: L{filter()}
3175 """
3176 pass
3177
3179 """Sets the path key used by widgets and dialogs for default path saving.
3180
3181 @type PathKey: str
3182 @param PathKey: The path key used for default path saving
3183 @rtype: None
3184 @see: L{pathKey()}
3185 """
3186 pass
3187
3189 """Sets the currently chosen file.
3190
3191 @type PickedFile: str
3192 @param PickedFile: The currently picked file
3193 @rtype: None
3194 @see: L{pickedFile()}
3195 """
3196 pass
3197
3199 """Sets the type of the file list.
3200
3201 @type T: L{Type}
3202 @param T: The type to set the file list to
3203 @rtype: None
3204 @see: L{type()}
3205 """
3206 pass
3207
3209 """Returns the type of the file list.
3210
3211 @rtype: L{Type}
3212 @return: The type of the file list
3213 @see: L{setType()}
3214 """
3215 pass
3216
3218 """Creates a new file list.
3219
3220 @type Value: variant
3221 @param Value: This can either be a L{FileList.Type} or another L{FileList}.
3222 @rtype: L{FileList}
3223 """
3224 pass
3225
3654
3657 """Represents the data model of export item.
3658
3659 B{Example Code}
3660
3661 >>> # Get Current GeoEntity
3662 >>> geo = mari.geo.current()
3663 >>> # Get a Channel from the GeoEntity
3664 >>> channel = geo.channelList()[0]
3665 >>> # Create an ExportItem for the Channel and configure its source and target
3666 >>> eItem = mari.ExportItem()
3667 >>> eItem.setSourceNodeName(channel.name())
3668 >>> eItem.setFileTemplate("$CHANNEL.$UDIM.tif")
3669 >>> # Add ExportItem to ExportManager
3670 >>> mari.exports.addExportItem(eItem, mari.current.geo())
3671 >>> # Export the ExportItem with a resolution override
3672 >>> mari.exports.exportTextures([eItem], "/tmp", Overrides = {"RESOLUTION": "512 x 512"})
3673 """
3674
3676 """Returns the colorspace to which exported textures are converted.
3677
3678 @rtype: str
3679 @return: The colorspace to convert the textures to
3680 @see: L{setColorspace()}
3681 """
3682 pass
3683
3685 """Returns the depth in which textures are exported.
3686
3687 @rtype: str
3688 @return: The texture depth for export
3689 @see: L{setDepth()}
3690 """
3691 pass
3692
3694 """Populate this L{ExportItem} from the L{XMLString} representing an L{ExportItem}.
3695
3696 @type XMLString: str
3697 @param XMLString: The L{XMLString} representing an L{ExportItem}
3698 @rtype: None
3699 """
3700 pass
3701
3703 """Returns the error string of L{ExportItem}.
3704
3705 If this L{ExportItem} has errors such as depth and file format mismatch. This function returns the string describing the error.
3706
3707 @rtype: list of str
3708 @return: The error string of L{ExportItem}
3709 @see: L{setErrorStringList()}
3710 """
3711 pass
3712
3714 """Returns whether this L{ExportItem} is enabled for export.
3715
3716 @rtype: bool
3717 @return: Whether this L{ExportItem} is enabled for export
3718 @see: L{setExportEnabled()}
3719 """
3720 pass
3721
3723 """Returns the image file options of textures to be exported.
3724
3725 @rtype: variant
3726 @return: The image file options of textures to be exported
3727 @see: L{setFileOptions()}
3728 """
3729 pass
3730
3732 """Returns the string representation of image file options.
3733
3734 @rtype: str
3735 @return: The string representation of image file options.
3736 """
3737 pass
3738
3740 """Returns the file template of textures to be exported.
3741
3742 @rtype: str
3743 @return: The file template of textures to be exported
3744 @see: L{setFileTemplate()}
3745 """
3746 pass
3747
3749 """Returns the L{GeoEntity} this L{ExportItem} is associated with.
3750
3751 @rtype: L{GeoEntity}
3752 @see: L{setGeoEntity()}
3753 """
3754 pass
3755
3757 """Returns the post process command to run after the export.
3758
3759 @rtype: str
3760 @return: The post process command to run after the export
3761 @see: L{setPostProcessCommand()}
3762 """
3763 pass
3764
3766 """Returns the resolution at which textures are exported.
3767
3768 @rtype: str
3769 @return: The texture resolution for export
3770 @see: L{setResolution()}
3771 """
3772 pass
3773
3775 """Processes the L{fileTemplate()} and returns the list of file paths with tokens replaced.
3776
3777 @type RootPath: str
3778 @param RootPath: Optional root path to prepend to the file template
3779 @rtype: list of str
3780 @return: The list of file paths the L{fileTemplate()} is resolved to
3781 """
3782 pass
3783
3785 """Replaces $ tokens in the fileTemplate and returns the resulting file path.
3786
3787 @rtype: str
3788 @return: The file path after replacing $ tokens in the fileTemplate
3789 """
3790 pass
3791
3793 """Serializes this L{ExportItem} as an XMLString.
3794
3795 @rtype: str
3796 @return: The XMLString representing this L{ExportItem}
3797 """
3798 pass
3799
3801 """Sets the colorspace to which exported textures are converted.
3802
3803 @type Colorspace: str
3804 @param Colorspace: The colorspace to convert the textures to
3805 @rtype: None
3806 @see: L{colorspace()}
3807 """
3808 pass
3809
3811 """Sets the depth in which textures are exported.
3812
3813 @type Depth: str
3814 @param Depth: The texture depth for export
3815 @rtype: None
3816 @see: L{depth()}
3817 """
3818 pass
3819
3821 """Sets the error string of L{ExportItem}.
3822
3823 If this L{ExportItem} has errors such as depth and file format mismatch. Set the error string via this function.
3824
3825 @type ErrorStringList: list of str
3826 @param ErrorStringList: The error string of L{ExportItem}
3827 @rtype: None
3828 @see: L{errorStringList()}
3829 """
3830 pass
3831
3833 """Sets whether this L{ExportItem} is enabled for export.
3834
3835 @type ExportEnabled: bool
3836 @param ExportEnabled: boolean to specify whether this L{ExportItem} is enabled for export.
3837 @rtype: None
3838 @see: L{exportEnabled()}
3839 """
3840 pass
3841
3843 """Sets the image file options of textures to be exported.
3844
3845 @type FileOptions: variant
3846 @param FileOptions: The image file options of textures to be exported
3847 @rtype: None
3848 @see: L{fileOptions()}
3849 """
3850 pass
3851
3853 """Sets the file template of textures to be exported.
3854
3855 @type FileTemplate: str
3856 @param FileTemplate: The file template of textures to be exported
3857 @rtype: None
3858 @see: L{fileTemplate()}
3859 """
3860 pass
3861
3863 """Sets the L{GeoEntity} this L{ExportItem} is associated with.
3864
3865 @type Entity: L{GeoEntity}
3866 @param Entity: the L{GeoEntity} objrect this L{ExportItem} is associated with
3867 @rtype: None
3868 @see: L{geoEntity()}
3869 """
3870 pass
3871
3872 - def setPostProcessCommand(self, PostProcessCommand):
3873 """Sets the post process command to run after the export.
3874
3875 @type PostProcessCommand: str
3876 @param PostProcessCommand: The post process command to run after the export
3877 @rtype: None
3878 @see: L{postProcessCommand()}
3879 """
3880 pass
3881
3883 """Sets the resolution at which textures are exported.
3884
3885 @type Resolution: str
3886 @param Resolution: The texture resolution for export
3887 @rtype: None
3888 @see: L{resolution()}
3889 """
3890 pass
3891
3893 """Sets the source node at which textures are flattened and exported from.
3894
3895 @type SourceNode: L{Node}
3896 @param SourceNode: the source node at which textures are flattened and exported from
3897 @rtype: None
3898 @see: L{sourceNode()}
3899 """
3900 pass
3901
3903 """Set UV Index list to export.
3904
3905 @type UVIndexList: list of int
3906 @param UVIndexList: UV Index list to export
3907 @rtype: None
3908 @see: L{uvIndexList()}
3909 """
3910 pass
3911
3913 """Sets the warning string of L{ExportItem}.
3914
3915 If this L{ExportItem} has warnings such as files to be overwritten. Set the warning string via this function.
3916
3917 @type WarningStringList: list of str
3918 @param WarningStringList: The warning string of L{ExportItem}
3919 @rtype: None
3920 @see: L{warningStringList()}
3921 """
3922 pass
3923
3925 """Returns the colorspace of the source node.
3926
3927 @rtype: str
3928 @return: The colorspace of the source node
3929 """
3930 pass
3931
3933 """Returns the depth of the source node.
3934
3935 @rtype: L{Image.Depth}
3936 @return: The depth of the source node in number of bits
3937 """
3938 pass
3939
3947
3949 """Returns the source node at which textures are flattened and exported from.
3950
3951 @rtype: L{Node}
3952 @return: The source node at which textures are flattened and exported from
3953 @see: L{setSourceNode()}
3954 """
3955 pass
3956
3958 """Returns the name of source node at which textures are flattened and exported from.
3959
3960 @rtype: str
3961 @return: The name of source node at which textures are flattened and exported from
3962 """
3963 pass
3964
3966 """Returns the resolution of the source node.
3967
3968 @rtype: str
3969 @return: The resolution of the source node
3970 """
3971 pass
3972
3974 """Return UV Index list to export.
3975
3976 @rtype: list of int
3977 @return: UV Index list to export
3978 @see: L{setUvIndexList()}
3979 """
3980 pass
3981
3983 """Returns the warning string of L{ExportItem}.
3984
3985 If this L{ExportItem} has warnings such as files to be overwritten. this function returns the string describing the warning.
3986
3987 @rtype: list of str
3988 @return: The warning string of L{ExportItem}
3989 @see: L{setWarningStringList()}
3990 """
3991 pass
3992
3993
3994 -class Node(Metadata):
3995 """Provides shader node graph functionality.
3996
3997 B{Example Code}
3998
3999 >>> # This example obtains a node from the node graph of the current geo entity
4000 >>> import mari
4001 >>> nodeGraph = mari.geo.current().nodeGraph()
4002 >>> node = nodeGraph.nodeList()[0]
4003 """
4004
4005 - def addNodeContext(self, Name, Context):
4006 """Adds the given L{Context} to this node with the given L{Name}.
4007
4008 @type Name: str
4009 @param Name: The name of the L{Context} is added under.
4010 @type Context: L{NodeContext}
4011 @param Context: The L{NodeContext} object to add.
4012 @rtype: None
4013 @raise RuntimeError: Raised if the L{NodeContext} cannot be added.
4014 """
4015 pass
4016
4017 - def addTag(self, Tag, ForceAdd=False):
4018 """Adds the given tag to this node.
4019
4020 All system tags are prefixed by underscores(_).Tags with underscores cannot be added unless L{ForceAdd} is True.
4021
4022 @type Tag: str
4023 @param Tag: The tag to add.
4024 @type ForceAdd: bool
4025 @param ForceAdd: Force adding the tag even if the given tag is considered a system tag.
4026 @rtype: None
4027 @raise RuntimeError: Raised if the given tag cannot be added.
4028 """
4029 pass
4030
4032 """Connects the viewer to this node for glsl rendering on the canvas.
4033
4034 @type InputNumber: int
4035 @param InputNumber: A number of the viewer's input that the node should be connected to. It should be in a range from 1 to 9.
4036 @rtype: None
4037 """
4038 pass
4039
4040 - def bake(self, Width, Height, Depth):
4041 """Bakes the result at the current node into an L{ImageSet} and returns the L{PaintNode} owning the L{ImageSet}.
4042
4043 @type Width: int
4044 @param Width: The default width of the L{ImageSet} (ignored for L{Ptex})
4045 @type Height: int
4046 @param Height: The default height of the (ignored for L{Ptex})
4047 @type Depth: int
4048 @param Depth: The default bit depth of the L{ImageSet}
4049 @rtype: L{PaintNode}
4050 @raise RuntimeError: Raised if the PainNode could not be created
4051 """
4052 pass
4053
4064
4066 """Returns whether this node has the given tag.
4067
4068 @type Tag: str
4069 @rtype: bool
4070 @return: Whether this node has the given tag.
4071 """
4072 pass
4073
4074 - def hash(self, UVIndex=-1, IgnoreChildren=False):
4075 """Returns a unique identifier for this node and its children.
4076
4077 This hash is assumed to be universally unique (256bit skein hash). This can be used to determine if this node or any of its connected child has changed since some given checkpoint. This hash is based on image data, parameters and anything that might effect the pixel output. Use this to detect any changes to a node, in the node graph.
4078
4079 @type UVIndex: int
4080 @param UVIndex: The UV index of the patch to return the hash of, or -1 (default) to return the hash of all the patches.
4081 @type IgnoreChildren: bool
4082 @param IgnoreChildren: A flag to specify whether we only want the hash of this node itself or whether we want an accumulative hash of this node and its connected children (default value).
4083 @rtype: str
4084 @return: A hash string that uniquely identifies a node and its childrens, or an empty string on failure.
4085 """
4086 pass
4087
4100
4108
4117
4125
4127 """Returns whether this node is a L{BakePointNode}.
4128
4129 @rtype: bool
4130 @return: Whether this node is a L{BakePointNode}
4131 """
4132 pass
4133
4135 """Returns whether this node is an L{GroupNode}.
4136
4137 @rtype: bool
4138 @return: Whether this node is an L{GroupNode}
4139 """
4140 pass
4141
4143 """Returns whether this node is a L{PaintNode}.
4144
4145 @rtype: bool
4146 @return: Whether this node is a L{PaintNode}
4147 """
4148 pass
4149
4151 """Returns whether this node is selected.
4152
4153 @rtype: bool
4154 @return: Whether this node is selected.
4155 """
4156 pass
4157
4159 """Returns the name of the node.
4160
4161 @rtype: str
4162 @return: The name of this node.
4163 @see: L{setName()}
4164 """
4165 pass
4166
4167 - def nodeContext(self, Name):
4168 """Returns the L{NodeContext} of the given name.
4169
4170 @type Name: str
4171 @param Name: The name of the L{NodeContext}
4172 @rtype: L{NodeContext}
4173 @return: The L{NodeContext} of the given name
4174 """
4175 pass
4176
4177 - def nodeContextNames(self):
4178 """Returns the names of L{NodeContext} this L{Node} holds.
4179
4180 @rtype: list of str
4181 @return: The list of names of L{NodeContext} this L{Node} holds
4182 """
4183 pass
4184
4192
4194 """Returns the name of the node.
4195
4196 @rtype: str
4197 @return: The name of the node.
4198 @deprecated: This function will be removed in a future version. Please use L{name()} instead.
4199 @see: L{setNodeName()}
4200 """
4201 pass
4202
4204 """Returns the L{NodeGraph} this L{Node} belongs to.
4205
4206 @rtype: L{NodeGraph}
4207 @return: L{NodeGraph} object this L{Node} belongs to.
4208 """
4209 pass
4210
4212 """Prints the node's source that is hashed and compared at upgrade time.
4213
4214 @rtype: None
4215 """
4216 pass
4217
4218 - def removeNodeContext(self, Name):
4219 """Removes the Context from this node with the given L{Name}.
4220
4221 @type Name: str
4222 @param Name: The name of the Context to be removed.
4223 @rtype: None
4224 @raise RuntimeError: Raised if the L{NodeContext} cannot be removed.
4225 """
4226 pass
4227
4228 - def removeTag(self, Tag, ForceRemove=False):
4229 """Removes the given tag to this node.
4230
4231 All system tags are prefixed by underscores(_).Tags with underscores cannot be removed unless L{ForceRemove} is True.
4232
4233 @type Tag: str
4234 @param Tag: The tag to remove.
4235 @type ForceRemove: bool
4236 @param ForceRemove: Force removing the tag even if the given tag is considered a system tag.
4237 @rtype: None
4238 @raise RuntimeError: Raised if the given tag cannot be removed.
4239 """
4240 pass
4241
4253
4267
4281
4283 """Sets the name of the node.
4284
4285 @type NewName: str
4286 @param NewName: The new name for the node.
4287 @rtype: None
4288 @see: L{name()}
4289 """
4290 pass
4291
4293 """Sets the name of the node.
4294
4295 @type NewName: str
4296 @param NewName: The new name of the node.
4297 @rtype: None
4298 @deprecated: This function will be removed in a future version. Please use L{setName()} instead.
4299 @see: L{nodeName()}
4300 """
4301 pass
4302
4304 """Sets whether this node is selected.
4305
4306 @type Selected: bool
4307 @param Selected: If True, this node will be selected. If False, this node wil be deselected.
4308 @rtype: None
4309 """
4310 pass
4311
4313 """Sets the type of this node.
4314
4315 This overwrites the node's type information. The type information is used for the node upgrade mechanism. Once the node's typeID is changed, the node will not be upgraded when the original node's XML file has changed.
4316
4317 @type TypeID: str
4318 @param TypeID: The type of node to set this node to.
4319 @rtype: None
4320 @see: L{typeID()}
4321 """
4322 pass
4323
4325 """Returns the list of tags this node holds.
4326
4327 @rtype: list of str
4328 @return: The list of tags this node holds.
4329 """
4330 pass
4331
4333 """Returns the type of this node.
4334
4335 @rtype: str
4336 @return: The type of this node.
4337 @see: L{setTypeID()}
4338 """
4339 pass
4340
4343 """A group of settings.
4344
4345 Users can load and save their own custom settings within Mari.
4346
4347 B{Example Code}
4348
4349 >>> # This examples shows how to store a user settings
4350 >>> import mari
4351 >>> settings = mari.Settings()
4352 >>> settings.setValue("Test Setting","Hello World")
4353 >>> print settings.value("Test Setting")
4354 Hello World
4355 """
4356
4358 """Appends prefix to the current group.
4359
4360 Starts a named nested set of values. All values set after this call and before the next L{endGroup()} will be accessable only via the groups namespace.
4361
4362 @type Prefix: str
4363 @param Prefix: Value to append
4364 @rtype: None
4365 @see: L{value}
4366 """
4367 pass
4368
4370 """Resets the group to what it was before the corresponding 'beginGroup()' call.
4371
4372 Ends a named nested set of values. All values set before this call and after the previous L{beginGroup()} will be accessable only via the groups namespace.
4373
4374 @rtype: None
4375 @see: L{value}
4376 """
4377 pass
4378
4380 """Sets the value of setting key to value.
4381
4382 If the key already exists, the previous value is overwritten.
4383
4384 @type Key: str
4385 @param Key: Setting key
4386 @type Value: variant
4387 @param Value: New value of the setting
4388 @rtype: None
4389 @see: L{value()}
4390 """
4391 pass
4392
4393 - def value(self, Key, DefaultValue=None):
4394 """Returns the value for setting key.
4395
4396 If the setting doesn't exist, returns defaultValue. If no default value is specified, 'None' is returned.
4397
4398 If the key was set within a L{beginGroup()} and L{endGroup()} the group's path must be appended to the L{Key} path
4399
4400 C{settings = mari.Settings()}
4401
4402 C{settings.beginGroup('foo')}
4403
4404 C{settings.setValue('bar', True)}
4405
4406 C{settings.endGroup()}
4407
4408 C{print settings.value('foo/bar')}
4409
4410 @type Key: str
4411 @param Key: Setting key
4412 @type DefaultValue: variant
4413 @param DefaultValue: Value returned if the setting doesn't exist
4414 @rtype: variant
4415 @return: The value of the setting, or the default if the setting doesn't exist.
4416 @see: L{setValue()}
4417 """
4418 pass
4419
4421 """Sets to the settings specified by the given components.
4422
4423 @rtype: L{Settings}
4424 """
4425 pass
4426
4427
4428 -class Light(Metadata):
4429 """An object for creating lighting effects on a 3D mesh.
4430
4431 You can access lights through the L{LightManager} - for example: C{mari.lights.list()}
4432
4433 B{Example Code}
4434
4435 >>> # This example shows hot to obtain all lights
4436 >>> import mari
4437 >>> lights = mari.lights.list()
4438
4439 @cvar SCENE: Fixes the light to the scene, so it does not move with the camera.
4440 @cvar CAMERA: Fixes the light to the camera.
4441 @group Signals: onChanged
4442 """
4443
4445 """These values define what type of object the light should be fixed to.
4446 @cvar SCENE: Fixes the light to the scene, so it does not move with the camera.
4447 @cvar CAMERA: Fixes the light to the camera.
4448 @note: These values are exposed in the parent class, but are also documented here for convenience.
4449 """
4450 SCENE = 0
4451 CAMERA = 1
4452
4453 SCENE = 0
4454 CAMERA = 1
4455
4457 """Indicates whether this is a environment light.
4458
4459 @rtype: bool
4460 @return: True if this light is an environment light or False if not.
4461 """
4462 pass
4463
4465 """Indicates whether the light is on or off.
4466
4467 @rtype: bool
4468 @return: True if the light is turned on, or False otherwise
4469 """
4470 pass
4471
4473 """Indicates whether this is a point light.
4474
4475 @rtype: bool
4476 @return: True if this light is an point light or False if not.
4477 """
4478 pass
4479
4481 """Returns the name of the light.
4482
4483 @rtype: str
4484 @return: The name of the light.
4485 """
4486 pass
4487
4489 """Emitted when on changes.
4490
4491 @type On: bool
4492 @param On: The new value
4493 @rtype: None
4494 """
4495 pass
4496
4497 - def setOn(self, OnOrOff):
4498 """Turns the light on or off.
4499
4500 @type OnOrOff: bool
4501 @param OnOrOff: Set to True to turn the light on, or False to turn it off
4502 @rtype: None
4503 """
4504 pass
4505
4508 """This class contains detailed version information for Mari.
4509
4510 B{Example Code}
4511
4512 >>> # This example stores mari information in a string and prints it out to the application log
4513 >>> import mari
4514 >>> version = mari.app.version()
4515 >>> mari_info_dict = {}
4516 >>> mari_info_dict["major"] = version.major()
4517 >>> mari_info_dict["minor"] = version.minor()
4518 >>> mari_info_dict["revision"] = version.revision()
4519 >>> mari_info_dict["stage"] = version.stage()
4520 >>> mari_info_string = "Mari {major}.{minor}.{revision}{stage}".format(**mari_info_dict)
4521 >>> mari.app.log(mari_info_string)
4522
4523 @cvar DEV: An internal development version.
4524 @cvar ALPHA: An early testing version.
4525 @cvar BETA: An advanced testing version.
4526 @cvar RELEASE: An official released version.
4527 """
4528
4530 """These values identify the build stages numerically.
4531 @cvar DEV: An internal development version.
4532 @cvar ALPHA: An early testing version.
4533 @cvar BETA: An advanced testing version.
4534 @cvar RELEASE: An official released version.
4535 @note: These values are exposed in the parent class, but are also documented here for convenience.
4536 """
4537 DEV = 0
4538 ALPHA = 1
4539 BETA = 2
4540 RELEASE = 3
4541
4542 DEV = 0
4543 ALPHA = 1
4544 BETA = 2
4545 RELEASE = 3
4546
4548 """Returns the date that this version was built.
4549
4550 @rtype: str
4551 @return: The build date as a string, in YYYY-MM-DD format.
4552 """
4553 pass
4554
4556 """Returns an information string describing the build.
4557
4558 @rtype: str
4559 """
4560 pass
4561
4563 """Indicates whether Mari is running on Linux.
4564
4565 @rtype: bool
4566 @return: True if on Linux, or False on other operating systems
4567 """
4568 pass
4569
4571 """Indicates whether Mari is running on Mac OS X.
4572
4573 @rtype: bool
4574 @return: True if on Mac OS X, or False on other operation systems
4575 """
4576 pass
4577
4579 """Indicates whether Mari is running on Windows.
4580
4581 @rtype: bool
4582 @return: True if on Windows, or False on other operating systems
4583 """
4584 pass
4585
4587 """Returns the iteration number, as used in alpha and beta builds.
4588
4589 For example, the iteration number of 1.2v3b4 is 4.
4590
4591 @rtype: int
4592 """
4593 pass
4594
4596 """Returns the major version number of the build.
4597
4598 For example, the major version number of 1.2v3 is 1.
4599
4600 @rtype: int
4601 """
4602 pass
4603
4605 """Returns the minor version number of the build.
4606
4607 For example, the minor version number of 1.2v3 is 2.
4608
4609 @rtype: int
4610 """
4611 pass
4612
4614 """Returns the full build version as an integer for comparison.
4615
4616 These build version integers can be compared to easily test whether one build comes before or after another.
4617
4618 The number consists of the major, minor, revision, stage, and iteration components of the version. For example, 1.5v6b7 would be 10506207 (with the 2 referring to the beta stage), and 1.5v6 would be 10506300 (with the 3 for the release stage).
4619
4620 @rtype: quint64
4621 """
4622 pass
4623
4625 """Returns the Qt version as a string.
4626
4627 @rtype: str
4628 @return: The version of Qt that Mari was built with, in x.x.x format.
4629 """
4630 pass
4631
4633 """Returns the 'v' revision number of the build.
4634
4635 For example, the revision number of 1.2v3 is 3.
4636
4637 @rtype: int
4638 """
4639 pass
4640
4642 """Returns the build stage - development, alpha, beta, or release.
4643
4644 @rtype: L{Stage}
4645 """
4646 pass
4647
4649 """Returns the full build version as a string for display.
4650
4651 @rtype: str
4652 """
4653 pass
4654
4656 """Returns the time that this version was built.
4657
4658 @rtype: str
4659 @return: The build time as a string, in 24 hour HH-MM format.
4660 """
4661 pass
4662
4665 """Manages Mari's OpenGL Renderer and associated objects.
4666
4667 Mari uses OpenGL to render in 3D. This object gives access to this renderer, allowing configuration of available shaders and other settings.
4668
4669 L{Shader} modules can be applied using the appropriate methods on L{GeoEntity} objects.
4670
4671 B{Example Code}
4672
4673 >>> # This example checks if color manager is applied
4674 >>> import mari
4675 >>> is_color_manager_ppplied = mari.gl_render.isPostProcessingEnabled()
4676
4677 @cvar SHADER_RELOAD_MACROS_FAILED: An error occurred during dynamic macro replacement.
4678 @cvar SHADER_COMPILE_FAILED: The shader failed to compile. This is most likely due to syntax errors in the GLSL code.
4679 @cvar SHADER_LINK_FAILED: The shader failed to link. This can be for many reasons such as references to declared functions that are not defined.
4680 @cvar SHADER_LINK_SUCCESS: The shader compiled and linked successfully and can be used.
4681 @group Signals: currentPostFilterCollectionModified, postFilterCollectionAdded, postFilterCollectionRemoved, postProcessingEnabled, setCurrentPostFilterCollection, shaderCompileComplete
4682 """
4683
4685 """These are used to define the various states a shader can be.
4686 @cvar SHADER_RELOAD_MACROS_FAILED: An error occurred during dynamic macro replacement.
4687 @cvar SHADER_COMPILE_FAILED: The shader failed to compile. This is most likely due to syntax errors in the GLSL code.
4688 @cvar SHADER_LINK_FAILED: The shader failed to link. This can be for many reasons such as references to declared functions that are not defined.
4689 @cvar SHADER_LINK_SUCCESS: The shader compiled and linked successfully and can be used.
4690 @note: These values are exposed in the parent class, but are also documented here for convenience.
4691 """
4692 SHADER_RELOAD_MACROS_FAILED = 0
4693 SHADER_COMPILE_FAILED = 1
4694 SHADER_LINK_FAILED = 2
4695 SHADER_LINK_SUCCESS = 3
4696
4697 SHADER_RELOAD_MACROS_FAILED = 0
4698 SHADER_COMPILE_FAILED = 1
4699 SHADER_LINK_FAILED = 2
4700 SHADER_LINK_SUCCESS = 3
4701
4703 """Applies a filter to current layer.
4704
4705 @type Filter: L{PostFilter}
4706 @param Filter: The filter to apply
4707 @rtype: bool
4708 @return: True if filter successfully applied
4709 """
4710 pass
4711
4713 """Makes a single call to OpenGL's 'glGetError()' and outputs the result to the log if an error is detected.
4714
4715 @rtype: None
4716 """
4717 pass
4718
4720 """Creates a new post process filter collection.
4721
4722 The creates a new post process filter stack with given name, and sets it as current.
4723
4724 @type Name: str
4725 @param Name: The name for the new post process filter collection.
4726 @rtype: L{PostFilterCollection}
4727 @raise ValueError: Raised if a collection with the given name already exists.
4728 @see: L{findPostFilterCollection()}, L{deletePostFilterCollection()}, L{currentPostFilterCollection()}, L{setPostFilterCollection()}
4729 """
4730 pass
4731
4732 - def createQuickApplyGLSL(self, Name, DefinitionsSnippet="", BodySnippet="", IconPath="", DisplayMetadata=True):
4733 """Creates a new GLSL post processing filter that can be applied to the viewport.
4734
4735 Mari supports post-render processing effects. These can be used to color-correct, blur, filter or warp the viewport display to achieve different effects.
4736
4737 Filters are implemented as two snippets of GLSL shader code:
4738 - The L{DefinitionsSnippet} defines uniforms and functions required for the filter
4739 - The L{BodySnippet} contains the implementation of the filter itself
4740 As multiple instances of a filter can be created, we need to give each instance a unique ID. To do this, all uniforms and function names in the shader should have a _$ID_ appended to their names. Mari takes this token internally and adds a unique ID. This preventing name collisions in shaders. For example, a definitions snippet that looks like:
4741
4742 C{uniform float ScaleX_$ID_;}
4743
4744 C{uniform float ScaleY_$ID_;}
4745
4746 will be translated internally into:
4747
4748 C{uniform float ScaleX1;}
4749
4750 C{uniform float ScaleY2;}
4751
4752 Body snippets should be protected with braces, and can expect the color value of the pixel being processed to be available in a vec4 called "Out".
4753
4754 If you wanted to simply multiply the viewport display pixels by a floating point value, for example, you could write something like:
4755
4756 C{definition_snippet = "uniform float ScaleValue_$ID_;"}
4757
4758 C{body_snippet = "{ Out.rgb *= ScaleValue_$ID_; }"}
4759
4760 The values passed into the shader can be controlled by modifying a metadata value on the L{PostFilter} object. The metadata value should have the same name and type as the uniform, but should not include the _$ID_. In the scaling example above, we could add some metadata to the filter called ScaleValue, and this would then be passed into the shader automatically.
4761
4762 @type Name: str
4763 @param Name: The name for the new filter
4764 @type DefinitionsSnippet: str
4765 @param DefinitionsSnippet: A snippet of GLSL code that defines the uniforms and functions used by this post process filter
4766 @type BodySnippet: str
4767 @param BodySnippet: A snippet of GLSL code that defines the body of the post process filter
4768 @type IconPath: str
4769 @param IconPath: Path of the icon used to represent the filter with
4770 @type DisplayMetadata: bool
4771 @param DisplayMetadata: If set to True the dialog will expose the metadata set on the filter allowing users to manipulate it
4772 @rtype: L{GLSLFilter}
4773 @return: A new post process filter object
4774 @raise ValueError: Raised if a filter of the given name already exists.
4775 """
4776 pass
4777
4779 """Returns the currently active post process filter collection.
4780
4781 These post process filters are executed in order.
4782
4783 @rtype: L{PostFilterCollection}
4784 @see: L{createPostFilterCollection()}, L{findPostFilterCollection()}, L{deletePostFilterCollection()}, L{setPostFilterCollection()}, L{setCurrentPostFilterCollection()}
4785 """
4786 pass
4787
4789 """This is emitted whenever the settings of any filter in the current post filter collection is changed.
4790
4791 @rtype: None
4792 """
4793 pass
4794
4795 - def deletePostFilterCollection(self, Collection):
4796 """Deletes a post process filter collection.
4797
4798 @type Collection: L{PostFilterCollection}
4799 @param Collection: The post filter collection to delete.
4800 @rtype: None
4801 @see: L{createPostFilterCollection()}, L{findPostFilterCollection()}, L{currentPostFilterCollection()}, L{setPostFilterCollection()}
4802 """
4803 pass
4804
4806 """Finds a filter.
4807
4808 @type Name: str
4809 @param Name: The name of filter required
4810 @rtype: L{PostFilter}
4811 @return: None if filter not found
4812 """
4813 pass
4814
4816 """Returns the post process filter collection of given name.
4817
4818 These post process filters are executed in order.
4819
4820 @type Name: str
4821 @param Name: The name for the post process filter collection to find.
4822 @rtype: L{PostFilterCollection}
4823 @return: The post process filter collection with the given name, or None if no matching collection exists
4824 @see: L{createPostFilterCollection()}, L{deletePostFilterCollection()}, L{currentPostFilterCollection()}, L{setPostFilterCollection()}
4825 """
4826 pass
4827
4829 """Returns the first occurrence of a filter with the given name.
4830
4831 @type Name: str
4832 @param Name: The name of filter to find
4833 @rtype: L{PostFilter}
4834 @return: A filter with the given name, or None if not found
4835 """
4836 pass
4837
4839 """Returns whether the current GL shader program is compiled and linked fine.
4840
4841 Returns whether the current GL shader program is compiled and linked fine. If the current shader is built in the background, it will wait for the completion.
4842
4843 @rtype: bool
4844 """
4845 pass
4846
4848 """Indicates whether post processing color management is applied to the viewport.
4849
4850 @rtype: bool
4851 @return: True if post processing is enabled, or False if not
4852 """
4853 pass
4854
4856 """Indicates whether a display LUT is being applied to the viewport.
4857
4858 @rtype: bool
4859 @return: True if the display-time LUT is enabled, or False otherwise
4860 @deprecated: Please use L{isPostProcessingEnabled()} instead.
4861 @see: L{setLutEnabled()}
4862 """
4863 pass
4864
4873
4874 - def postFilterCollectionAdded(self, Collection):
4875 """This is emitted when a new post processing filter collection is added.
4876
4877 @type Collection: L{PostFilterCollection}
4878 @param Collection: The newly added post filter collection
4879 @rtype: None
4880 """
4881 pass
4882
4884 """Returns the names of all the post filter collections.
4885
4886 @rtype: list of str
4887 @return: The names of all the post filter collections
4888 """
4889 pass
4890
4892 """This is emitted when a post processing filter collection is removed.
4893
4894 @type Name: str
4895 @param Name: The name of the post filter collection that was removed
4896 @rtype: None
4897 """
4898 pass
4899
4901 """Returns all the post filter collections.
4902
4903 @rtype: list of L{PostFilterCollection}
4904 @return: All the post filter collections
4905 """
4906 pass
4907
4908 - def postProcessingEnabled(self, Enabled):
4909 """This is emitted when post processing is enabled or disabled.
4910
4911 @type Enabled: bool
4912 @param Enabled: Whether of not post processing is enabled
4913 @rtype: None
4914 @see: L{setPostProcessingEnabled()}
4915 """
4916 pass
4917
4918 @staticmethod
4920 """Registers a new adjustment layer type from the given XML file path.
4921
4922 @type Name: str
4923 @param Name: The name of the layer. Paths separated by / in the name will appear as nested menu groups.
4924 @type FilePath: str
4925 @param FilePath: The XML file path that defines the adjustment
4926 @rtype: None
4927 @raise ValueError: Raised if the given XML file does not contain a valid XML string
4928 @raise RuntimeError: Raised if the given Name exists
4929 @raise IOError: Raised if the given XML file does not exist
4930 """
4931 pass
4932
4933 @staticmethod
4935 """Registers a new custom blend mode.
4936
4937 Registers a new custom blend mode written in GLSL. The code must contain a function :
4938 - that returns the result of blending in vec4
4939 - that takes in three arguments where the first argument is the base value in vec4, the second argument is the blended value in vec4, and the third argument is the blend amount
4940 - that has the function name matching the L{FunctionName} parameter
4941 B{Example Code}
4942
4943 >>> # This example registers a custom blend mode
4944 >>> mari.gl_render.registerCustomBlendMode("My Mix", "Comp_MyMix",'''
4945 ... vec4 Comp_MyMix(vec4 base, vec4 over, float blend_amount)
4946 ... {
4947 ... //Blends using standard OpenGL mix for RGB with the blend_amount while the alpha is the max of base or over
4948 ... return vec4( mix(base.rgb, over.rgb, blend_amount), max(base.a,over.a) );
4949 ... }
4950 ... ''')
4951
4952 @type DisplayName: str
4953 @param DisplayName: The name of the blend mode to display in the GUI.
4954 @type FunctionName: str
4955 @param FunctionName: The name of the GLSL function to call.
4956 @type BlendModeCode: str
4957 @param BlendModeCode: The blend mode logic written in GLSL.
4958 @rtype: None
4959 """
4960 pass
4961
4962 @staticmethod
4964 """Registers a new custom code file written in GLSL.
4965
4966 Registers a new custom code file written in GLSL. The text contents of the given file will be included in the compilation of Mari's GLSL shader. In combination with the header file registered with L{registerCustomHeaderFile()}, the functions defined in the registered file will be available to custom layers and shaders. This behaves like .c file of C language. The L{UUID} uniquely identifies the file. Another path registered with the same L{UUID} is regarded as a new version for the file and replace the old one. The L{UUID} and path pair is also used to track missing files.
4967
4968 @type UUID: str
4969 @param UUID: Unique ID of the file
4970 @type FilePath: str
4971 @param FilePath: The file path containing the GLSL
4972 @rtype: None
4973 @raise IOError: Raised if the given file does not exist
4974 """
4975 pass
4976
4977 @staticmethod
4979 """Registers a new diffuse shader type from the given XML file path.
4980
4981 @type Name: str
4982 @param Name: The name of the layer.
4983 @type FilePath: str
4984 @param FilePath: The XML file path that defines the diffuse shader
4985 @rtype: None
4986 @raise ValueError: Raised if the given XML file does not contain a valid XML string
4987 @raise RuntimeError: Raised if the given Name exists
4988 @raise IOError: Raised if the given XML file does not exist
4989 """
4990 pass
4991
4992 @staticmethod
4994 """Registers a new custom header file written in GLSL.
4995
4996 Registers a new custom header file written in GLSL. The text contents of the given file will be included in relevant parts of the shader system. L{Shader} and layer GLSL code can access function declarations and variables declared in the header file. This behaves like .h file of C language. The L{UUID} uniquely identifies the file. Another path registered with the same L{UUID} is regarded as a new version for the file and replace the old one. The L{UUID} and path pair is also used to track missing files.
4997
4998 @type UUID: str
4999 @param UUID: Unique ID of the file
5000 @type FilePath: str
5001 @param FilePath: The file path containing the GLSL
5002 @rtype: None
5003 @raise IOError: Raised if the given file does not exist
5004 """
5005 pass
5006
5007 @staticmethod
5009 """Registers a new layered shader type from the given XML file path.
5010
5011 @type Name: str
5012 @param Name: The name of the layered shader.
5013 @type FilePath: str
5014 @param FilePath: The XML file path that defines the layered shader
5015 @rtype: None
5016 @raise ValueError: Raised if the given XML file does not contain a valid XML string
5017 @raise RuntimeError: Raised if the given Name exists
5018 @raise IOError: Raised if the given XML file does not exist
5019 """
5020 pass
5021
5022 @staticmethod
5024 """Registers a new node type from the given XML file path.
5025
5026 @type Name: str
5027 @param Name: The name of the node. Paths separated by / in the name will appear as nested menu groups.
5028 @type FilePath: str
5029 @param FilePath: The XML file path that defines the adjustment
5030 @rtype: None
5031 @raise ValueError: Raised if the given XML file does not contain a valid XML string
5032 @raise RuntimeError: Raised if the given Name exists
5033 @raise IOError: Raised if the given XML file does not exist
5034 """
5035 pass
5036
5037 @staticmethod
5039 """Registers a new procedural layer type from the given XML file path.
5040
5041 @type Name: str
5042 @param Name: The name of the layer. Paths separated by / in the name will appear as nested menu groups.
5043 @type FilePath: str
5044 @param FilePath: The XML file path that defines the procedural
5045 @rtype: None
5046 @raise ValueError: Raised if the given XML file does not contain a valid XML string
5047 @raise RuntimeError: Raised if the given Name exists
5048 @raise IOError: Raised if the given XML file does not exist
5049 """
5050 pass
5051
5052 @staticmethod
5054 """Registers a new specular shader type from the given XML file path.
5055
5056 @type Name: str
5057 @param Name: The name of the layer.
5058 @type FilePath: str
5059 @param FilePath: The XML file path that defines the specular shader
5060 @rtype: None
5061 @raise ValueError: Raised if the given XML file does not contain a valid XML string
5062 @raise RuntimeError: Raised if the given Name exists
5063 @raise IOError: Raised if the given XML file does not exist
5064 """
5065 pass
5066
5067 @staticmethod
5069 """Registers a new standalone shader type from the given XML file path.
5070
5071 @type Name: str
5072 @param Name: The name of the layer.
5073 @type FilePath: str
5074 @param FilePath: The XML file path that defines the standlone shader
5075 @rtype: None
5076 @raise ValueError: Raised if the given XML file does not contain a valid XML string
5077 @raise RuntimeError: Raised if the given Name exists
5078 @raise IOError: Raised if the given XML file does not exist
5079 """
5080 pass
5081
5083 """Reloads layer and shader definition files.
5084
5085 Reloads layer and shader definition files. A custom shader and layer developer can reload and test the shader and layer definition files without relaunching Mari by executing this function.
5086
5087 @rtype: None
5088 """
5089 pass
5090
5092 """Deletes (removes) a filter.
5093
5094 @type Filter: L{PostFilter}
5095 @param Filter: The filter to delete
5096 @rtype: None
5097 @raise ValueError: Raised if the filter is not a quick apply filter.
5098 """
5099 pass
5100
5101 - def runGLSLCode(self, GLSLCode, Destination, Source=None, Mask=None, BlendMode="", BlendAmount=1.0):
5102 """Runs the given GLSL code and writes the result into the given L{ImageSet}.
5103
5104 The GLSL code must write the result into the "Output" variable as vec4.
5105
5106 When L{Source} is provided, the GLSL code can use the values from the texture values in L{Source} by using the token, "#Input". The result will be blended onto the L{Source} L{ImageSet} with L{Mask} applied using the L{BlendMode} and L{BlendAmount}
5107
5108 Examples :
5109
5110 This fills selected area in red and leave the rest black. C{mari.gl_render.runGLSLCode("Output = vec4(_State.Selected,0,0,1);",DestImageSet)}
5111
5112 This fills the selected area in red and blends it with L{Source} image set and writes the result into Dest C{mari.gl_render.runGLSLCode("Output = vec4(1,0,0,_State.Selected);",DestImageSet,SourceImageSet)}
5113
5114 This amplifies the red component of non-masked area of the L{Source} imageset and writes the result into Dest C{mari.gl_render.runGLSLCode("Output = vec4(#Input.r*2.0,#Input.gba",DestImageSet,SourceImageSet,MaskImageSet)}
5115
5116 This fills the selected area in transparency. Note that, in order to modify alpha component, you must use Comp_Copy blend mode C{mari.gl_render.runGLSLCode("Output = mix(#Input, vec4(0,0,0,0), float(_State.Selected));",DestImageSet,SourceImageSet,None,"Comp_Copy")}
5117
5118 @type GLSLCode: str
5119 @type Destination: L{ImageSet}
5120 @type Source: L{ImageSet}
5121 @type Mask: L{ImageSet}
5122 @type BlendMode: str
5123 @type BlendAmount: float
5124 @rtype: None
5125 """
5126 pass
5127
5129 """This is emitted just after the current post filter collection is changed.
5130
5131 @rtype: None
5132 @see: L{currentPostFilterCollection()}
5133 """
5134 pass
5135
5137 """Set a custom 1D display LUT to use while rendering.
5138
5139 The LUT (lookup table) is used to transform incoming color values to a new display value. This can be used to simulate different display devices, etc.
5140
5141 By default, an identity (no transform) LUT is used.
5142
5143 @type Lut: list of L{Color}
5144 @param Lut: A vector of L{Colors}. This should contain 1024 entries.
5145 @rtype: None
5146 @deprecated: Please use the L{PostFilterCollection} functions in conjunction with the L{CustomLUTFilter} class instead of this function.
5147 """
5148 pass
5149
5151 """Enable and disable the display time LUT.
5152
5153 If the LUT is disabled, no color transforms will be applied to the rendered image or textures before display.
5154
5155 @type Enabled: bool
5156 @param Enabled: True will enable the application of a display time LUT; False will disable it.
5157 @rtype: None
5158 @deprecated: Please use L{setPostProcessingEnabled()} instead.
5159 @see: L{lutEnabled()}
5160 """
5161 pass
5162
5163 - def setPostFilterCollection(self, Collection):
5164 """Sets a post process filter collection as the current.
5165
5166 Changes the current post process filter collection to another.
5167
5168 @type Collection: L{PostFilterCollection}
5169 @param Collection: The post filter collection to set.
5170 @rtype: None
5171 @see: L{createPostFilterCollection()}, L{findPostFilterCollection()}, L{deletePostFilterCollection()}, L{currentPostFilterCollection()}
5172 """
5173 pass
5174
5175 - def setPostProcessingEnabled(self, Enabled):
5176 """Enables or disables post processing color management in the viewport.
5177
5178 @type Enabled: bool
5179 @param Enabled: True to enable post processing, or False to disable it
5180 @rtype: None
5181 @see: L{postProcessingEnabled()}
5182 """
5183 pass
5184
5186 """This is emitted whenever the current GL shader program is compiled and linked.
5187
5188 C{# Print out result when current GL shader program compiles.}
5189
5190 C{def printShaderCompileResult(result, error_message):}
5191
5192 C{print 'Shader Compile SUCCEEDED' if result == mari.gl_render.SHADER_LINK_SUCCESS else 'Shader Compile FAILED'}
5193
5194 C{if error_message:}
5195
5196 C{print 'Error Message:\\n', error_message}
5197
5198 C{mari.utils.connect(mari.gl_render.shaderCompileComplete, printShaderCompileResult)}
5199
5200 @type Result: L{GLRender.ShaderCompileResult}
5201 @param Result: Whether the current GL shader program is compiled and linked successfully.
5202 @type ErrorMessage: str
5203 @param ErrorMessage: The associated error message if compilation or linking failed.
5204 @rtype: None
5205 """
5206 pass
5207
5209 """Upgrades existing shaders and layers based on up-to-date XML definitions.
5210
5211 Upgrades existing shaders and layers based on up-to-date XML definitions. A custom shader and layer developer can call this function after L{reloadXMLDefinitions()} to update existing shaders and layers with the new updated definitions.
5212
5213 @rtype: None
5214 """
5215 pass
5216
5217
5218 -class DDI(object):
5219 """This class gives access to some of the functionality of Mari's Dynamic Data Interface.
5220
5221 The Dynamic Data Interface, or L{DDI}, is the low level data handling system in Mari. This system manages the caches on disk and in memory.
5222
5223 The functionality provided can be used to test Mari's performance on different systems.
5224
5225 A good test of raw performance is to set the cache size to 1 GB (but remember to change this back!) and then run a profile test for 4 or 5 GB. This ensures that all of the memory created during the test is saved and loaded. You should use a new, empty project for this sort of testing.
5226
5227 B{Example Code}
5228
5229 >>> import mari
5230 >>> mari.ddi.garbageCollect()
5231 """
5232
5234 """Releases RAM by uncaching currently cached data blocks.
5235
5236 After calling this method, the number of data blocks reported by liveBlocks should be significantly reduced.
5237
5238 @rtype: None
5239 """
5240 pass
5241
5243 """Returns the total number of data blocks managed by Mari.
5244
5245 Mari manages data as individual blocks. This method returns the number of blocks that Mari currently knows about in the current project. Each block may be of any size, and may be reused multiple times.
5246
5247 @rtype: qint64
5248 @return: The number of individual blocks that Mari knows about in the current project
5249 """
5250 pass
5251
5253 """Performs a full garbage collection on the cache directory.
5254
5255 Mari records all of your brush strokes to the L{DDI} as you are painting. When you exit the application, or remove those undo records, the data on disk is no longer needed. These garbage files are removed by Mari automatically.
5256
5257 If you want to optimize your cache (just before archiving, for example) you can use this method. It should be used in conjunction with the L{History.clear()} method. This will ensure that only valid data remains in the cache.
5258
5259 @rtype: None
5260 @note: This may take a while to execute, depending on the size of the cache.
5261 """
5262 pass
5263
5265 """Returns the number of blocks that are loaded into system RAM.
5266
5267 This can be smaller than the total number of blocks.
5268
5269 @rtype: qint64
5270 @return: The number of blocks that are live - i.e. loaded into system RAM
5271 """
5272 pass
5273
5275 """Returns the number of bytes currently loaded into system RAM.
5276
5277 The number of bytes currently loaded into system RAM
5278
5279 @rtype: qint64
5280 """
5281 pass
5282
5284 """Returns the size of the memory cache.
5285
5286 @rtype: qint64
5287 @return: The size in bytes of the memory cache
5288 @see: L{setMemoryCacheSize}
5289 """
5290 pass
5291
5292 - def profile(self, NumberOfBlocks=30000, BlockSize=30000, RandomSize=False):
5293 """Runs performance tests on the L{DDI}.
5294
5295 This can help to track down problems on systems showing poor performance. This method will create a number of blocks of a given size. These blocks will be filled with random data to ensure they are unique, registered with the L{DDI}, and then freed. The time taken for this in milliseconds will be returned. If the operation detects any problems they will be reported into the Mari Log.
5296
5297 @type NumberOfBlocks: int
5298 @param NumberOfBlocks: The number of blocks to register while profiling
5299 @type BlockSize: unsigned int
5300 @param BlockSize: The maximum size of block to create while profiling, in bytes
5301 @type RandomSize: bool
5302 @param RandomSize: If set to True, each block will be of a random size between 1 and L{BlockSize} bytes; otherwise all blocks will be exactly L{BlockSize} bytes.
5303 @rtype: int
5304 @return: The time in milliseconds that the test took to run
5305 """
5306 pass
5307
5309 """Sets the amount of system memory used by the L{DDI} for caching.
5310
5311 Mari maintains an area of system memory that it uses to cache data blocks. Blocks are loaded from disk into this cache, and then removed in a least-recently-used scheme. i.e. if blocks are used, they are kept around, but if a block is not used for a while and some memory needs to be freed, it will be cleared to make room for a new block.
5312
5313 This method controls the size of this cache. It does not need to be too big, as Mari is very efficient at managing this data. It is a good idea to limit this so other programs on your system have memory to work with.
5314
5315 @type Size: qint64
5316 @param Size: The number of bytes Mari should use for memory caching
5317 @rtype: None
5318 @warning: If set to a large value, Mari will use all of the RAM on your system, and you will see degraded performance.
5319 @see: L{memoryCacheSize()}
5320 """
5321 pass
5322
5325 """Manages creation and manipulation of menu entries.
5326
5327 The menu manager creates and manipulates entries on the menus.
5328
5329 Menu paths are all split into three components: the "set" (e.g. "MainWindow" for the main window menu), the "root" (e.g. "File", potentially with an "&" in it for the shortcut key), and the "submenu" (an optional menu under that, such as "Open", also possibly containing "&" characters). This split will be made automatically by the various menu functions, but it is necessary to supply at least a set and a root to add an action.
5330
5331 Path elements should be separated by slashes, and any leading slash is ignored - so using either "MainWindow/File" or "/MainWindow/File" is equivalent.
5332
5333 B{Example Code}
5334
5335 >>> # This example finds the "Print Hello" action from registered actions and add it to the menus
5336 >>> import mari
5337 >>> action = mari.actions.find("Mari/Scripts/MyCustomActions/Print Hello")
5338 >>> #mari.menus.addAction(action,"MainWindow/P&ython/&Examples")
5339
5340 >>> # This example removes the "Print Hello" action from the menus
5341 >>> import mari
5342 >>> #mari.menus.removeAction("MainWindow/P&ython/&Examples/Print Hello")
5343 """
5344
5346 """Returns the actions available for the given set, root and optional sub menu.
5347
5348 C{mari.menus.actions("MainWindow","&File")}
5349
5350 @type rSet: str
5351 @param rSet: The set containing the root menu to look in.
5352 @type rRoot: str
5353 @param rRoot: The root menu to look up items in.
5354 @type rSubMenu: str
5355 @param rSubMenu: The submenu to look up items in.
5356 @rtype: list of L{Action}
5357 @return: The list of items associated with a given set/root menu/submenu
5358 """
5359 pass
5360
5362 """Adds an action to the menu in the given path.
5363
5364 C{# Create an example item in the main file menu, before the save option}
5365
5366 C{mari.menus.addAction(mari.actions.create('Create Project And Import', 'mari.examples.create_project.createAndImport()'), "MainWindow/&File/", "/MainWindow/&File/&Save")}
5367
5368 @type pAction: L{Action}
5369 @param pAction: The existing action to add to the menu.
5370 @type rPath: str
5371 @param rPath: The menu path to add
5372 @type rAddBefore: str
5373 @param rAddBefore: The text of an item in the given menu. The new action will be added immediately before the given item. If left blank, the item will be appended to the end of the menu. To add before a separator, pass in any string beginning with '-'. This should be just the name of the item not the full path. To find the list of items in a menu use L{itemNames()}
5374 @rtype: None
5375 @raise ValueError: Raised if the action or path were invalid, or if an item to add before was specified but did not match a valid item in the given menu.
5376 """
5377 pass
5378
5380 """Adds a separator to the menu in the given path.
5381
5382 @type Path: str
5383 @param Path: The menu path to add
5384 @type rAddBefore: str
5385 @param rAddBefore: The text of an item in the given menu. The new action will be added immediately before the given item. If left blank, the item will be appended to the end of the menu. To add before another separator, pass in any string beginning with '-'.
5386 @rtype: None
5387 @raise ValueError: Raised if the action or path were invalid, or if an item to add before was specified but did not match a valid item in the given menu.
5388 """
5389 pass
5390
5392 """Returns the names of the items available for the given set, root and optional sub menu.
5393
5394 C{mari.menus.itemNames("MainWindow","&File")}
5395
5396 @type rSet: str
5397 @param rSet: The set containing the root menu to look in.
5398 @type rRoot: str
5399 @param rRoot: The root menu to look up items in.
5400 @type rSubMenu: str
5401 @param rSubMenu: The submenu to look up items in.
5402 @rtype: list of str
5403 @return: The list of items associated with a given set/root menu/submenu
5404 """
5405 pass
5406
5408 """Removes the specified action from the given menu.
5409
5410 @type pAction: L{Action}
5411 @param pAction: The action to remove from the menu.
5412 @type rFullPath: str
5413 @param rFullPath: The path to the action - B{not} including its name.
5414 @rtype: None
5415 @raise ValueError: Raised if the action was not found in the given menu.
5416 """
5417 pass
5418
5420 """Removes an action specified by a path from the menu.
5421
5422 @type rFullPath: str
5423 @param rFullPath: The path to the action, including its name.
5424 @rtype: None
5425 @raise ValueError: Raised if the action was not found.
5426 """
5427 pass
5428
5430 """Returns a list of the root menus available for the given set.
5431
5432 Mari has a hierarchical menu system. Menus may contain other menus. Each set of menus has one or more root menus. These are the items that appear in the menu bar and are presented as context menus.
5433
5434 @type rSet: str
5435 @param rSet: The set to look up root menus for.
5436 @rtype: list of str
5437 @return: A list of the root menu names.
5438 """
5439 pass
5440
5442 """Returns a list of the available menu sets.
5443
5444 Mari maintains multiple sets of menus. These menus appear in different contexts such as the main window or the context (right click) menus of various palettes. This method returns the list of set names.
5445
5446 @rtype: list of str
5447 @return: The list of available menu sets.
5448 """
5449 pass
5450
5452 """Returns a list of the submenus available for the given set and root menu.
5453
5454 @type rSet: str
5455 @param rSet: The set containing the root menu to look in.
5456 @type rRoot: str
5457 @param rRoot: The root menu to look up submenus in.
5458 @rtype: list of str
5459 @return: The list of sub menus associated with a given root menu
5460 """
5461 pass
5462
5463 menus = MenuManager()
5467 """Manages geometry objects in the project.
5468
5469 Mari can handle many 3D objects at once. Each 3D object or entity can have multiple geometric representations.
5470
5471 This interface allows the user to query the internal object lists, add objects, remove objects, and generally build up a scene.
5472 B{Example Code}
5473
5474 C{# This examples obtains the current geometry object}
5475
5476 C{import mari}
5477
5478 C{current_object = mari.geo.current()}
5479
5480 @cvar SELECTION_GROUPS_DONT_CREATE: Don't create selection groups.
5481 @cvar SELECTION_GROUPS_CREATE_FROM_FACE_GROUPS: Create selection sets from face groups.
5482 @cvar GEOMETRY_IMPORT_DONT_SELECT_CHILDREN: Do not select children of the object.
5483 @cvar GEOMETRY_IMPORT_DONT_MERGE_CHILDREN: Do not merge children of the object.
5484 @cvar MERGESELECTIONGROUP_DO_NOT_MERGE: Do not merge selection groups that have the same name (default).
5485 @cvar MERGESELECTIONGROUP_MERGE_SELECTIONGROUP_HAVING_SAME_NAME: Merge selection groups that have the same name.
5486 @cvar MERGETYPE_JUST_MERGE_NODES: Semi merge type, where we preserve all the individual geometries within the geo entity.
5487 @cvar MERGETYPE_SINGLE_MESH: Full merge type, where everything is collapsed into one single geometry within the geo entity.
5488 @cvar VTX_BOUNDARY_NONE: do not interpolate boundaries
5489 @cvar VTX_BOUNDARY_EDGE_ONLY: sharpen edges
5490 @cvar VTX_BOUNDARY_EDGE_AND_CORNER: sharpen edges and corners
5491 @cvar CREASE_UNIFORM: Catmark rule.
5492 @cvar CREASE_CHAIKIN: Chaikin rule.
5493 @cvar FVAR_LINEAR_NONE: smooth everywhere ("edge only")
5494 @cvar FVAR_LINEAR_CORNERS_ONLY: sharpen corners only
5495 @cvar FVAR_LINEAR_CORNERS_PLUS1: ("edge corner")
5496 @cvar FVAR_LINEAR_CORNERS_PLUS2: ("edge and corner + propagate corner")
5497 @cvar FVAR_LINEAR_BOUNDARIES: sharpen all boundaries ("always sharp")
5498 @cvar FVAR_LINEAR_ALL: bilinear interpolation ("bilinear")
5499 @cvar SCHEME_CATMARK: Catmark clark.
5500 @cvar SCHEME_LOOP: Loop.
5501 @cvar SCHEME_BILINEAR: Bilinear.
5502 @cvar TRI_SUB_CATMARK: Catmark weights (Catmark scheme only).
5503 @cvar TRI_SUB_SMOOTH: "smooth triangle" weights (Catmark scheme only)
5504 @group Signals: entityAdded, entityMadeCurrent, entityRemoved
5505 """
5506
5508 """Options to create selection sets.
5509 @cvar SELECTION_GROUPS_DONT_CREATE: Don't create selection groups.
5510 @cvar SELECTION_GROUPS_CREATE_FROM_FACE_GROUPS: Create selection sets from face groups.
5511 @note: These values are exposed in the parent class, but are also documented here for convenience.
5512 """
5513 SELECTION_GROUPS_DONT_CREATE = 0
5514 SELECTION_GROUPS_CREATE_FROM_FACE_GROUPS = 1
5515
5516 SELECTION_GROUPS_DONT_CREATE = 0
5517 SELECTION_GROUPS_CREATE_FROM_FACE_GROUPS = 1
5518
5520 """These are various options of how an imported hierarchy of objects is to be selected and merged.
5521 @cvar GEOMETRY_IMPORT_DONT_SELECT_CHILDREN: Do not select children of the object.
5522 @cvar GEOMETRY_IMPORT_DONT_MERGE_CHILDREN: Do not merge children of the object.
5523 @note: These values are exposed in the parent class, but are also documented here for convenience.
5524 """
5525 GEOMETRY_IMPORT_DONT_SELECT_CHILDREN = 1 << 0
5526 GEOMETRY_IMPORT_DONT_MERGE_CHILDREN = 1 << 1
5527
5528 GEOMETRY_IMPORT_DONT_SELECT_CHILDREN = 1 << 0
5529 GEOMETRY_IMPORT_DONT_MERGE_CHILDREN = 1 << 1
5530
5532 """Geometry selection group with same name merge type.
5533 @cvar MERGESELECTIONGROUP_DO_NOT_MERGE: Do not merge selection groups that have the same name (default).
5534 @cvar MERGESELECTIONGROUP_MERGE_SELECTIONGROUP_HAVING_SAME_NAME: Merge selection groups that have the same name.
5535 @note: These values are exposed in the parent class, but are also documented here for convenience.
5536 """
5537 MERGESELECTIONGROUP_DO_NOT_MERGE = 0
5538 MERGESELECTIONGROUP_MERGE_SELECTIONGROUP_HAVING_SAME_NAME = 1
5539
5540 MERGESELECTIONGROUP_DO_NOT_MERGE = 0
5541 MERGESELECTIONGROUP_MERGE_SELECTIONGROUP_HAVING_SAME_NAME = 1
5542
5544 """Geometry merge type image data formats.
5545 @cvar MERGETYPE_JUST_MERGE_NODES: Semi merge type, where we preserve all the individual geometries within the geo entity.
5546 @cvar MERGETYPE_SINGLE_MESH: Full merge type, where everything is collapsed into one single geometry within the geo entity.
5547 @note: These values are exposed in the parent class, but are also documented here for convenience.
5548 """
5549 MERGETYPE_JUST_MERGE_NODES = 1
5550 MERGETYPE_SINGLE_MESH = 2
5551
5552 MERGETYPE_JUST_MERGE_NODES = 1
5553 MERGETYPE_SINGLE_MESH = 2
5554
5556 """These are various types of objects that we can load from a geometry file.
5557 @note: These values are exposed in the parent class, but are also documented here for convenience.
5558 """
5559 ROOT = 0
5560 GROUP = 1
5561 POLYMESH = 2
5562 FACESET = 3
5563 SUBDIV = 4
5564 CAMERA = 5
5565
5566 ROOT = 0
5567 GROUP = 1
5568 POLYMESH = 2
5569 FACESET = 3
5570 SUBDIV = 4
5571 CAMERA = 5
5572
5574 """Enumerated type for vertex boundary interpolation rules.
5575 @cvar VTX_BOUNDARY_NONE: do not interpolate boundaries
5576 @cvar VTX_BOUNDARY_EDGE_ONLY: sharpen edges
5577 @cvar VTX_BOUNDARY_EDGE_AND_CORNER: sharpen edges and corners
5578 @note: These values are exposed in the parent class, but are also documented here for convenience.
5579 """
5580 VTX_BOUNDARY_NONE = 0
5581 VTX_BOUNDARY_EDGE_ONLY = 1
5582 VTX_BOUNDARY_EDGE_AND_CORNER = 2
5583
5584 VTX_BOUNDARY_NONE = 0
5585 VTX_BOUNDARY_EDGE_ONLY = 1
5586 VTX_BOUNDARY_EDGE_AND_CORNER = 2
5587
5589 """Enumerated type for edge crease methods.
5590 @cvar CREASE_UNIFORM: Catmark rule.
5591 @cvar CREASE_CHAIKIN: Chaikin rule.
5592 @note: These values are exposed in the parent class, but are also documented here for convenience.
5593 """
5594 CREASE_UNIFORM = 0
5595 CREASE_CHAIKIN = 1
5596
5597 CREASE_UNIFORM = 0
5598 CREASE_CHAIKIN = 1
5599
5601 """Enumerated type for face-varying interpolation rules.
5602 @cvar FVAR_LINEAR_NONE: smooth everywhere ("edge only")
5603 @cvar FVAR_LINEAR_CORNERS_ONLY: sharpen corners only
5604 @cvar FVAR_LINEAR_CORNERS_PLUS1: ("edge corner")
5605 @cvar FVAR_LINEAR_CORNERS_PLUS2: ("edge and corner + propagate corner")
5606 @cvar FVAR_LINEAR_BOUNDARIES: sharpen all boundaries ("always sharp")
5607 @cvar FVAR_LINEAR_ALL: bilinear interpolation ("bilinear")
5608 @note: These values are exposed in the parent class, but are also documented here for convenience.
5609 """
5610 FVAR_LINEAR_NONE = 0
5611 FVAR_LINEAR_CORNERS_ONLY = 1
5612 FVAR_LINEAR_CORNERS_PLUS1 = 2
5613 FVAR_LINEAR_CORNERS_PLUS2 = 3
5614 FVAR_LINEAR_BOUNDARIES = 4
5615 FVAR_LINEAR_ALL = 5
5616
5617 FVAR_LINEAR_NONE = 0
5618 FVAR_LINEAR_CORNERS_ONLY = 1
5619 FVAR_LINEAR_CORNERS_PLUS1 = 2
5620 FVAR_LINEAR_CORNERS_PLUS2 = 3
5621 FVAR_LINEAR_BOUNDARIES = 4
5622 FVAR_LINEAR_ALL = 5
5623
5625 """Enumerated type for all subdivisions schemes supported by OpenSubdiv.
5626 @cvar SCHEME_CATMARK: Catmark clark.
5627 @cvar SCHEME_LOOP: Loop.
5628 @cvar SCHEME_BILINEAR: Bilinear.
5629 @note: These values are exposed in the parent class, but are also documented here for convenience.
5630 """
5631 SCHEME_CATMARK = 0
5632 SCHEME_LOOP = 1
5633 SCHEME_BILINEAR = 2
5634
5635 SCHEME_CATMARK = 0
5636 SCHEME_LOOP = 1
5637 SCHEME_BILINEAR = 2
5638
5640 """Enumerated type for the triangle subdivsion weights rule.
5641 @cvar TRI_SUB_CATMARK: Catmark weights (Catmark scheme only).
5642 @cvar TRI_SUB_SMOOTH: "smooth triangle" weights (Catmark scheme only)
5643 @note: These values are exposed in the parent class, but are also documented here for convenience.
5644 """
5645 TRI_SUB_CATMARK = 0
5646 TRI_SUB_SMOOTH = 1
5647
5648 TRI_SUB_CATMARK = 0
5649 TRI_SUB_SMOOTH = 1
5650
5651 - def addLocator(self, AddAsChildToSelectedObject=False):
5652 """Add a locator to the project.
5653
5654 C{# Add root level locator}
5655
5656 C{>>> import mari}
5657
5658 C{>>> mari.geo.addLocator()}
5659
5660 C{# Add another locator, parented to the locator created previously}
5661
5662 C{>>> mari.geo.addLocator(True)}
5663
5664 @type AddAsChildToSelectedObject: bool
5665 @param AddAsChildToSelectedObject: Flag to speficy whether the locator is to be created at the root level or parented to the currently selected object in the objects palette.
5666 @rtype: L{LocatorEntity}
5667 @return: The newly-created locator.
5668 """
5669 pass
5670
5672 """Returns the currently selected geoentity object.
5673
5674 @rtype: L{GeoEntity}
5675 @return: The currently selected geoentity object.
5676 @see: L{setCurrent()}
5677 """
5678 pass
5679
5681 """Returns the currently selected locator object.
5682
5683 @rtype: L{LocatorEntity}
5684 @return: The currently selected locator object.
5685 """
5686 pass
5687
5689 """Duplicates the current selected L{GeoEntity} in the project.
5690
5691 @type DuplicateShaderNetwork: bool
5692 @param DuplicateShaderNetwork: Toggles whether to duplicate the shader network of the selected object as well.
5693 @rtype: None
5694 @raise RuntimeError: Raised if no project is opened.
5695 """
5696 pass
5697
5699 """Duplicates an input L{GeoEntity} in the project.
5700
5701 @type Object: L{GeoEntity}
5702 @param Object: The object to duplicate.
5703 @type DuplicateShaderNetwork: bool
5704 @param DuplicateShaderNetwork: Toggles whether to duplicate the shader network of the selected object as well.
5705 @rtype: None
5706 @raise RuntimeError: Raised if no project is opened.
5707 """
5708 pass
5709
5711 """This is emitted after a new geometry object has been added to the project.
5712
5713 This only includes manual addition (by menu or by script), however. It will not be emitted when a project is loaded.
5714
5715 @type pNewEntity: L{GeoEntity}
5716 @param pNewEntity: The newly-added geometry object
5717 @rtype: None
5718 """
5719 pass
5720
5722 """This is emitted after a new geometry object becomes current.
5723
5724 @type pNewCurrent: L{GeoEntity}
5725 @param pNewCurrent: The new current geometry object
5726 @rtype: None
5727 """
5728 pass
5729
5731 """This is emitted after a new geometry object has been removed from the project.
5732
5733 This only includes manual removal (by menu or by script), however. It will not be emitted when a project is closed.
5734
5735 @type pOldEntity: L{GeoEntity}
5736 @param pOldEntity: The geometry object that was just removed
5737 @rtype: None
5738 """
5739 pass
5740
5741 - def find(self, Name):
5742 """Finds a geometry object from the scene, given the name of the entity.
5743
5744 @type Name: str
5745 @param Name: The name of the entity to look for
5746 @rtype: L{GeoEntity}
5747 @return: The requested geometry object if found, or None otherwise
5748 @see: L{get()}
5749 """
5750 pass
5751
5753 """Get a list of the geometry operations, registered by entity image manager.
5754
5755 @rtype: list of L{GeometryOperation}
5756 @return: A list of geometry operations.
5757 """
5758 pass
5759
5760 - def get(self, Name):
5761 """Gets a geometry object from the scene, given the name of the entity.
5762
5763 @type Name: str
5764 @param Name: The name of the entity to look for
5765 @rtype: L{GeoEntity}
5766 @return: The requested geometry object
5767 @raise ValueError: Raised if no entity with the given name was found.
5768 @see: L{find()}
5769 """
5770 pass
5771
5773 """Returns the names of animation takes from a file.
5774
5775 @type Path: str
5776 @param Path: The file path to query
5777 @rtype: list of str
5778 @return: a list of takes
5779 @raise RuntimeError: Raised if the file cannot be loaded by Mari or we cannot have any take information
5780 """
5781 pass
5782
5784 """Returns the name of the default take.
5785
5786 @type Path: str
5787 @param Path: The file path to query
5788 @rtype: str
5789 @return: name of default take
5790 @raise RuntimeError: Raised if the file cannot be loaded by Mari or we cannot have any take information
5791 """
5792 pass
5793
5794 - def getFileContents(self, Path):
5795 """Returns a list of objects, name and type, that can be loaded from a file.
5796
5797 @type Path: str
5798 @param Path: The file path to query
5799 @rtype: variant
5800 @return: A list of objects that can be loaded, their names and types
5801 @raise RuntimeError: Raised if file cannot be loaded by Mari or we cannot get the contents of the file
5802 """
5803 pass
5804
5806 """Returns the start and end frames of a file.
5807
5808 @type Path: str
5809 @param Path: The file path to query
5810 @type Take: str
5811 @param Take: Optional take used to query specific animation range if the file supports the concept of takes
5812 @rtype: list of int
5813 @return: a list of two items, which are the start and end frames
5814 @raise RuntimeError: Raised if the file cannot be loaded by Mari or the take is invalid or we cannot get a frame range from the file
5815 """
5816 pass
5817
5819 """Import the L{GeoEntity} from the geometry archive given in L{DirPath}.
5820
5821 @type DirPath: str
5822 @param DirPath: The directory path from which the L{GeoEntity} is loaded.
5823 @rtype: L{GeoEntity}
5824 """
5825 pass
5826
5828 """Returns a list of all objects in the project.
5829
5830 @rtype: list of L{GeoEntity}
5831 @return: All objects in the project.
5832 """
5833 pass
5834
5836 """Returns a list of all locators in the project.
5837
5838 @rtype: list of L{LocatorEntity}
5839 @return: All locators in the project.
5840 """
5841 pass
5842
5843 - def load(self, Path, Options=None, ObjectsToLoad=None, LoadAsChild=False):
5844 """Loads the given file as new geometry.
5845
5846 Requests for object loading are routed to the correct plugin based on file extension.
5847
5848 The settings for the geometry load can be controlled by the function parameter L{Options}. This parameter should be a dictionary, with strings for keys, and values. The geometry loader plug-in that interprets the mesh to be loaded will receive the options passed in here that it recognises, and the others will be ignored. A list of the commonly used settings is as follows:
5849 - "MappingScheme" - geometry mapping scheme (type MeshOptions).
5850 - "MultipleGeometries" - how to handle multiple geometries in a single object (type MultipleGeometryOptions).
5851 - "PtexFaceSizeScheme" - L{Ptex} specific: scheme to use for face texture size calculations (type PtexFaceSizeScheme).
5852 - "PtexFaceSize" - L{Ptex} specific: size to use with the scheme above (type int).
5853 - "PtexImageFormat" - L{Ptex} specific: image data format (type PtexFormat).
5854 - "PtexFaceColor" - L{Ptex} specific: color to clear faces to (type L{Color}).
5855 - "PtexImportFilename" - L{Ptex} specific: import an existing L{Ptex} file onto the .obj geoemtry (type string).
5856 - "PtexShowCreationDialog" - L{Ptex} specific: show the L{Ptex} creation dialog after mesh loading (type Bool; default is False from Python).
5857 - "EachMeshCreatesObject" - each mesh can either create an Object or each be a geometry within a single Object. This is currently L{Ptex} specific. (type Bool; default is True).
5858 - "MergeType" - merging of geometries can be either single-mesh or just-merge-nodes (type mari.GeoManager.MergeType).
5859 - "MergeSelectionGroupWithSameNameType" - merging of face selection groups that have the same name (type mari.GeoManager.MergeSelectionGroupWithSameNameType) - default is mari.GeoManager.MERGESELECTIONGROUP_DO_NOT_MERGE
5860 - "CreateSelectionSets" - specify whether to create selection sets from face groups (type L{CreateSelectionSetOptions}) - default value is mari.GeoManager.CREATE_FROM_FACE_GROUPS
5861 - "FrameOffset" - specify the start frame in Mari's timeline to import the geometry (default value is zero).
5862 There are two special options ('CreateChannels' and 'ImportChannels', with a list of L{ChannelInfo} as values) that can optionally be passed in to allow the user to create/import channels when loading geometry; not passing these options results in default channels (diffuse) being created. Example usage of these would be as follows:
5863
5864 >>> import mari
5865 >>> # Example code on loading geometry and creating a channel
5866 >>> mari.geo.load('/tmp/test.abc', {'name':'test', 'CreateChannels':[mari.ChannelInfo('exampleChan', 2048, 2048, 16),]})
5867 >>>
5868 >>> # Example code to load a geometry and import a channel
5869 >>> importChannel = mari.ChannelInfo('test1', 2048, 2048, 16)
5870 >>> importChannel.setPath('/tmp')
5871 >>> importChannel.setFileTemplate('/$PATH/test.tif')
5872 >>> mari.geo.load('/tmp/test.abc', {'name':'test', 'ImportChannels':[importChannel,]})
5873
5874 When used in combination with the C API, this allows users to pass in parameters with specified names to a custom geometry loader. See the C API documentation for further details.
5875
5876 The L{Options} parameter can also be provided as a list of strings in I{"name=value"} format. This usage is deprecated, but is provided for backwards compatibility.
5877
5878 >>> # Assuming the geometry loader for the 'abc' format understands the parameters 'size' and 'name'
5879 >>> import mari
5880 >>> try:
5881 ... mari.geo.load('/tmp/test.abc', {'size': 5, 'name': 'test'})
5882 ... except:
5883 ... pass
5884
5885 @type Path: str
5886 @param Path: The path to the file to be loaded. A file may contain multiple entities.
5887 @type Options: variant
5888 @param Options: This is an optional parameter which can be used to pass options to the file loader. L{Options} should ideally be provided in dictionary format, as described above.
5889 @type ObjectsToLoad: variant
5890 @param ObjectsToLoad: This is a list of objects to load from the file. Each item of the list is a dictionary that contains the name of the objects to load and various geometry import flags to specify whether the children of the current object are to be selected and whether they are to be merged as well. children underneath the current node onto 1 entity.
5891 @type LoadAsChild: bool
5892 @param LoadAsChild: A flag to indicate whether the newly added geometry will be parented to the currently selected object in the project or not.
5893 @rtype: list of L{GeoEntity}
5894 @return: A list of the entities loaded from the given file. This list may be empty if the load failed.
5895 @raise RuntimeError: Raised if no project is currently open, or if there was a general error with loading such as missing importers or channel creation failure.
5896 @raise ValueError: Raised if the input file path is invalid.
5897 @raise ValueError: Raised if there was a problem interpreting the options.
5898 @deprecated: Please pass the Options parameter in C{{'name': value}} dictionary format, instead of the old C{['name=value']} list format.
5899 """
5900 pass
5901
5903 """Returns a list of the names of the geometry objects in the current project.
5904
5905 @rtype: list of str
5906 @return: A list of the names of the geometry objects in the current project
5907 """
5908 pass
5909
5911 """Removes a given entity from the project.
5912
5913 The given entity and all child entities will be removed and placed onto the undo stack.
5914
5915 You cannot remove the last entity from a project.
5916
5917 @type Name: str
5918 @param Name: The name of the entity to be removed
5919 @rtype: bool
5920 @return: Always True. On failure, it raises an exception. I{(See below - please do not use this return value)}
5921 @raise RuntimeError: Raised if no project was open, or if only one object remains in the project.
5922 @raise ValueError: Raised if no object with the given name was found.
5923 @deprecated: Please do not use the return value of this function. It will be removed in a future version, because it is unnecessary.
5924 """
5925 pass
5926
5928 """Sets the currently selected object.
5929
5930 @type Name: str
5931 @param Name: The name of the object to make current. This must be a valid name as returned by objectNames().
5932 @rtype: None
5933 @raise ValueError: Raised if the provided name does not match any object in the current project.
5934 @raise RuntimeError: Raised if no project was open.
5935 @see: L{current()}
5936 """
5937 pass
5938
5940 """Sets the currently selected object.
5941
5942 @type Object: L{GeoEntity}
5943 @param Object: The object to make current
5944 @rtype: None
5945 @raise ValueError: Raised if an invalid object was provided.
5946 @raise RuntimeError: Raised if no project was open.
5947 @see: L{current()}
5948 """
5949 pass
5950
5960
5963 """Provides shader node graph functionality.
5964
5965 B{Example Code}
5966
5967 This example creates a Perlin node and Merge node, connect them and sets a property
5968
5969 >>> # obtain the root level node graph of the current geo entity
5970 >>> import mari
5971 >>> nodeGraph = mari.geo.current().nodeGraph()
5972 >>>
5973 >>> # Obtain the list of node types
5974 >>> nodeTypeList = nodeGraph.typeList()
5975 >>>
5976 >>> # Create perlin noise node
5977 >>> perlin = nodeGraph.createNode("Procedural/Noise/Perlin")
5978 >>>
5979 >>> # Create a merge node
5980 >>> merge = nodeGraph.createNode("Layer/Merge")
5981 >>>
5982 >>> # Connect the perlin node to the Base input of the merge node
5983 >>> merge.setInputNode("Base",perlin)
5984 >>>
5985 >>> # Obtain parameters of the merge node
5986 >>> parameterNames = merge.metadataNames()
5987 >>>
5988 >>> # Set the BlendAmount of merge node to 0.5
5989 >>> merge.setMetadata("Amount",0.5)
5990
5991 This example shows how to create a L{PaintNode}
5992
5993 >>> paintNode = nodeGraph.createPaintNode( 1024, 1024, 8, mari.Color(1.0,1.0,0.0,1.0) )
5994 """
5995
5997 """Adds the given node to this node graph
5998
5999 @type NodeToAdd: L{Node}
6000 @param NodeToAdd: The L{Node} to be added.
6001 @rtype: None
6002 """
6003 pass
6004
6006 """Bake all empty bake point nodes and update any out of date bake point nodes in the graph.
6007
6008 @rtype: None
6009 """
6010 pass
6011
6013 """Bake all the selected bake point nodes in the graph, where we bake any of the selected nodes.
6014
6015 @rtype: None
6016 """
6017 pass
6018
6020 """Creates a L{BakePointNode} with given settings.
6021
6022 @type Width: int
6023 @param Width: The default width of the L{ImageSet} (ignored for L{Ptex}) to bake into
6024 @type Height: int
6025 @param Height: The default height of the (ignored for L{Ptex}) to bake into
6026 @type Depth: int
6027 @param Depth: The default bit depth of the L{ImageSet} to bake into
6028 @type FillColor: L{Color}
6029 @param FillColor: The color to fill the initial L{ImageSet} to bake into
6030 @rtype: L{BakePointNode}
6031 @raise RuntimeError: Raised if the L{PaintNode} could not be created
6032 """
6033 pass
6034
6036 """Creates a node of the given type.
6037
6038 B{Example Code}
6039
6040 This example creates a tri planar node.
6041
6042 >>> # obtain the root level node graph of the current geo entity
6043 >>> import mari
6044 >>> nodeGraph = mari.geo.current().nodeGraph()
6045 >>>
6046 >>> # Create a tri planar node "Projection/Tri Planar Projection"
6047 >>> nodeGraph.createNode("Projection/Tri Planar Projection")
6048 >>>
6049 >>> # Create a tri planar node using the deprecated key "Environment/Tri Planar Projection"
6050 >>> # This should give you a deprecation warning on your console
6051 >>> nodeGraph.createNode("Environment/Tri Planar Projection")
6052
6053 @type Type: str
6054 @param Type: The type of the node to be created.
6055 @rtype: L{Node}
6056 @raise RuntimeError: Raised if the given type is not valid.
6057 """
6058 pass
6059
6061 """Creates a paintable node with given settings.
6062
6063 @type Width: int
6064 @param Width: The default width of the L{ImageSet} (ignored for L{Ptex})
6065 @type Height: int
6066 @param Height: The default height of the (ignored for L{Ptex})
6067 @type Depth: int
6068 @param Depth: The default bit depth of the L{ImageSet}
6069 @type FillColor: L{Color}
6070 @param FillColor: The color to fill the initial L{ImageSet} in.
6071 @rtype: L{PaintNode}
6072 @raise RuntimeError: Raised if the L{PaintNode} could not be created
6073 """
6074 pass
6075
6077 """Deletes the given node.
6078
6079 @type NodeToDelete: L{Node}
6080 @param NodeToDelete: The L{Node} to be deleted.
6081 @rtype: None
6082 @raise RuntimeError: Raised if the given node does not belong to this node graph.
6083 """
6084 pass
6085
6087 """Saves the archive of the given nodes to the given location.
6088
6089 This saves the given nodes in an XML format and saves all dependencies into the given directory If the given location does not exist, it is created. If there are any exising files and directories, they will be deleted.
6090
6091 The nodes saved in the XML file as part of the archive are assigned with new unique UUIDs for sanity. The map returned by this function contains the mapping of the original node UUIDs to the unique UUIDs of the nodes in the XML file. A partial list of the new unique UUIDs can be given as an optional argument to L{importNodesFromArchive()} to load a partial set of nodes from the archive.
6092
6093 @type DirPath: str
6094 @param DirPath: The directory path to save the nodes archive to.
6095 @type Nodes: list of L{Node}
6096 @param Nodes: The list of nodes to save as archive.
6097 @type NoDataBlockCopy: bool
6098 @param NoDataBlockCopy: Whether to skip copying data blocks. If True, the images are copied only as template, but without texture data. This is False by default.
6099 @type UVIndexList: list of int
6100 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
6101 @rtype: QHash of str, str
6102 @return: Returns the map of original node UUIDs to the new unique UUIDs stored in the node XML file of the archive.
6103 """
6104 pass
6105
6106 @staticmethod
6108 """Returns the list of nodes in the upstream of the given node.
6109
6110 @type DestNode: L{Node}
6111 @param DestNode: The destination node from which this function returns the upstream nodes.
6112 @rtype: list of L{Node}
6113 @return: The list of nodes in the upstream of L{DestNode}
6114 """
6115 pass
6116
6118 """Groups the given nodes and returns the resulting L{GroupNode}.
6119
6120 @type Nodes: list of L{Node}
6121 @param Nodes: the list of nodes to group.
6122 @rtype: L{GroupNode}
6123 @return: The new L{GroupNode} containing the given nodes.
6124 @raise RuntimeError: Raised if any of the Nodes does not belong to this L{NodeGraph}.
6125 """
6126 pass
6127
6129 """Loads nodes from the archive directory exported by exportNodesAsArchive.
6130
6131 @type DirPath: str
6132 @param DirPath: The directory path to the node archive
6133 @type UuidsToLoad: list of str
6134 @param UuidsToLoad: The list of UUID of nodes to partially load from the archive. If empty, all the nodes in the archive are loaded.
6135 @type UvIndexMap: QHash of int, list of int
6136 @param UvIndexMap: Map to specify remapping of patches based on UvIndex. E.g. provide {0:[1,2],3:[]} to copy UV patch 0 to 1 and 2, then remove UV patch 3. If this argument is non-empty. It should be all inclusive. Patches not included in this map will be discarded.
6137 @rtype: list of L{Node}
6138 @return: Returns the list of nodes imported from the archive
6139 """
6140 pass
6141
6142 - def load(self, FilePath):
6143 """Loades the nodes in the file into this L{NodeGraph} and returns the loaded nodes.
6144
6145 @type FilePath: str
6146 @param FilePath: The file path from which the nodes areloaded.
6147 @rtype: list of L{Node}
6148 @return: The loaded nodes.
6149 """
6150 pass
6151
6153 """Returns a list of the nodes in this node graph.
6154
6155 B{Example Code}
6156
6157 This example returns a list of nodes in the root nodegraph of the currently-selected geoentity.
6158
6159 >>> # obtain the root level node graph of the current geo entity
6160 >>> import mari
6161 >>> nodeGraph = mari.geo.current().nodeGraph()
6162 >>>
6163 >>> # Obtain the list of node types
6164 >>> nodeList = nodeGraph.nodeList()
6165 >>>
6166 >>> # Print the count of nodes
6167 >>> print("+ %d nodes found" % (len(nodeList))
6168
6169 @rtype: list of L{Node}
6170 @return: A list of the nodes in this node graph.
6171 """
6172 pass
6173
6175 """Loads and returns the nodes in the string into this L{NodeGraph}.
6176
6177 This takes in the string returnd by L{nodesToString()} and loads the nodes into this L{NodeGraph}.
6178
6179 @type String: str
6180 @param String: The string in which nodes are contained.
6181 @rtype: list of L{Node}
6182 @return: Returns the nodes loaded.
6183 """
6184 pass
6185
6187 """Returns the string representation of the given nodes.
6188
6189 The returned string can be useful for copy&paste purpose. L{save()} will save this string into the resulting file.
6190
6191 @type Nodes: list of L{Node}
6192 @param Nodes: The nodes to represent in the string.
6193 @rtype: str
6194 @return: The string represending the L{Nodes}.
6195 @raise RuntimeError: Raised if any of the Nodes does not belong to this L{NodeGraph}.
6196 """
6197 pass
6198
6200 """Returns the list of nodes having the given L{Tag}.
6201
6202 @type Tag: str
6203 @param Tag: The tag of the nodes to be returned.
6204 @rtype: list of L{Node}
6205 @return: The list of nodes having the given L{Tag}.
6206 """
6207 pass
6208
6210 """Return the L{GeoEntity} this L{NodeGraph} belongs to if this L{NodeGraph} is not the root level network (i.e.
6211
6212 does not belong to a L{GroupNode}).
6213
6214 @rtype: L{GeoEntity}
6215 @return: The L{GeoEntity} this L{NodeGraph} belongs to.
6216 """
6217 pass
6218
6220 """Returns the parent L{GroupNode} if this L{NodeGraph} is the child node graph of the L{GroupNode}.
6221
6222 @rtype: L{GroupNode}
6223 @return: The parent L{GroupNode}
6224 """
6225 pass
6226
6228 """Removes the given node from this node graph
6229
6230 @type NodeToRemove: L{Node}
6231 @param NodeToRemove: The L{Node} to be removed.
6232 @rtype: None
6233 """
6234 pass
6235
6236 - def save(self, FilePath, Nodes):
6237 """Saves the given node to the specified file.
6238
6239 @type FilePath: str
6240 @param FilePath: The file path to save the given nodes to.
6241 @type Nodes: list of L{Node}
6242 @param Nodes: The nodes to save to the given file path.
6243 @rtype: None
6244 @raise RuntimeError: Raised if any of the Nodes does not belong to this L{NodeGraph}.
6245 """
6246 pass
6247
6249 """Returns a list of selected nodes in this node graph.
6250
6251 B{Example Code}
6252
6253 This example returns the list of selected nodes in the root nodegraph of the currently-selected geoentity.
6254
6255 >>> # obtain the root level node graph of the current geo entity
6256 >>> import mari
6257 >>> nodeGraph = mari.geo.current().nodeGraph()
6258 >>>
6259 >>> # Get the selected nodes
6260 >>> selectedNodeList = nodeGraph.selectedNodeList()
6261 >>>
6262 >>> # Print the count of nodes
6263 >>> print("+ %d selected nodes found" % (len(selectedNodeList))
6264
6265 @rtype: list of L{Node}
6266 @return: A list of the selected nodes in this node graph.
6267 """
6268 pass
6269
6278
6279 @staticmethod
6281 """Returns the topologically sorted list of nodes towards the L{DestNode}.
6282
6283 @type DestNode: L{Node}
6284 @param DestNode: The destination node to topological sort nodes towards.
6285 @type ReverseOrder: bool
6286 @param ReverseOrder: If True, the returned list will be in the reverse order.
6287 @rtype: list of L{Node}
6288 @return: The topologically sorted list of nodes.
6289 """
6290 pass
6291
6293 """Returns a list of the types of nodes that can be created.
6294
6295 @rtype: list of str
6296 @return: A list of the types of nodes that can be created.
6297 """
6298 pass
6299
6301 """Update all the selected bake point nodes in the graph, where we re-bake any of the out of date bake point nodes.
6302
6303 @rtype: None
6304 """
6305 pass
6306
6308 """Returns the viewer node of the node graph.
6309
6310 Mari's viewport shows the result of all the node graph processing up to the viewer node. The viewer node is a node to specify which node to view the node graph processing.
6311
6312 @rtype: L{Node}
6313 @return: The viewer node of the node graph.
6314 """
6315 pass
6316
6317 @staticmethod
6319 """Returns whether the given connection would break directed acyclic graph (DAG).
6320
6321 This function tests whether making the connection between L{SourceNode} and DesNode would break directed acyclic graph.
6322
6323 @type SourceNode: L{Node}
6324 @param SourceNode: The source node of potential connection to test the DAG breakage.
6325 @type DestNode: L{Node}
6326 @param DestNode: The destination node of potential connection to test the DAG breakage.
6327 @rtype: bool
6328 @return: Whether the connection would break DAG.
6329 @raise RuntimeError: Raised if the two inputs do not belong to the same node graph.
6330 """
6331 pass
6332
6333
6334 -class Image(Metadata):
6335 """These objects contain individual 2D images.
6336
6337 You can access images either from an L{ImageSet} or through the L{ImageManager} - for example:
6338
6339 C{mari.images.list()}
6340
6341 B{Example Code}
6342
6343 >>> # This example obtains the image of UDIM 1001 from the current layer of the current channel
6344 >>> import mari
6345 >>> layer = mari.geo.current().currentChannel().currentLayer()
6346 >>> if layer.isPaintableLayer():
6347 ... image_set = layer.imageSet()
6348 ... image = image_set.image(0)
6349
6350 >>> # This examples opens an image through ImageManager and obtains the Image object
6351 >>> import mari
6352 >>> import os
6353 >>> imagePath = os.path.join(mari.resources.path(mari.resources.IMAGES),"NoThumb.png")
6354 >>> image = mari.images.load(imagePath)
6355
6356 @cvar DEPTH_BYTE: Standard eight bit depth.
6357 @cvar DEPTH_HALF: Half-float depth.
6358 @cvar DEPTH_FLOAT: Full float depth.
6359 @cvar FILESPACE_NORMAL: Copy Values.
6360 @cvar FILESPACE_VECTOR: Values [0,1] get mapped to [-1,+1] for float and half formats. No conversion for bytes.
6361 @cvar FILESPACE_VECTOR_Y_FLIP: Same as VECTOR but Y component of vector is flipped, i.e. [-1,+1] is mapped to [+1,-1] for Y.
6362 @cvar FILESPACE_NORMAL_Y_FLIP: Same as NORMAL but Y vector is flipped, i.e. [0,1] is mapped to [1,0] for Y.
6363 @cvar DEFAULT_OPTIONS: None of the other options are set.
6364 @cvar DISABLE_SMALL_UNIFORMS: Turns off "small uniforms" (exporting blank textures as 8x8).
6365 @cvar ENABLE_FULL_PATCH_BLEED: Turns on "full texture bleed" (full patch texture bleed is generated). This takes effect only for exporting textures.
6366 @cvar REMOVE_ALPHA: Remove the alpha channel (convert RGBA to RGB).
6367 @cvar BACKGROUND_EXPORT: When set saveAs will return immediately and exporting will occur as a background job. Background jobs may not report errors or raise exceptions.
6368 @group Signals: aboutToClose, aboutToExport, aboutToImport, colorspaceConfigChanged, exported, imported
6369 """
6370
6372 """These are the colorspaces supported by by images and image sets.
6373
6374 The colorspace affects how image data is displayed. A scalar colorspace indicates that pixel data is not affected by color management options.
6375
6376 @note: These values are exposed in the parent class, but are also documented here for convenience.
6377 """
6378 COLORSPACE_COLOR = 0
6379 COLORSPACE_SCALAR = 1
6380
6381 COLORSPACE_COLOR = 0
6382 COLORSPACE_SCALAR = 1
6383
6385 """These are the bit depths supported by images and image sets.
6386 @cvar DEPTH_BYTE: Standard eight bit depth.
6387 @cvar DEPTH_HALF: Half-float depth.
6388 @cvar DEPTH_FLOAT: Full float depth.
6389 @note: These values are exposed in the parent class, but are also documented here for convenience.
6390 """
6391 DEPTH_BYTE = 8
6392 DEPTH_HALF = 16
6393 DEPTH_FLOAT = 32
6394
6395 DEPTH_BYTE = 8
6396 DEPTH_HALF = 16
6397 DEPTH_FLOAT = 32
6398
6400 """These are the file spaces supported by by images and image sets.
6401
6402 The file space affects how image data is imported and exported. Vectors may be encoded in a variety of ways externally. Internally, Mari encodes vectors [0,+1] so may need to translate when dealing with external files.
6403
6404 @cvar FILESPACE_NORMAL: Copy Values.
6405 @cvar FILESPACE_VECTOR: Values [0,1] get mapped to [-1,+1] for float and half formats. No conversion for bytes.
6406 @cvar FILESPACE_VECTOR_Y_FLIP: Same as VECTOR but Y component of vector is flipped, i.e. [-1,+1] is mapped to [+1,-1] for Y.
6407 @cvar FILESPACE_NORMAL_Y_FLIP: Same as NORMAL but Y vector is flipped, i.e. [0,1] is mapped to [1,0] for Y.
6408 @note: These values are exposed in the parent class, but are also documented here for convenience.
6409 """
6410 FILESPACE_NORMAL = 0
6411 FILESPACE_VECTOR = 1
6412 FILESPACE_VECTOR_Y_FLIP = 2
6413 FILESPACE_NORMAL_Y_FLIP = 3
6414
6415 FILESPACE_NORMAL = 0
6416 FILESPACE_VECTOR = 1
6417 FILESPACE_VECTOR_Y_FLIP = 2
6418 FILESPACE_NORMAL_Y_FLIP = 3
6419
6421 """Specifies optional behavior for image saving.
6422 @cvar DEFAULT_OPTIONS: None of the other options are set.
6423 @cvar DISABLE_SMALL_UNIFORMS: Turns off "small uniforms" (exporting blank textures as 8x8).
6424 @cvar ENABLE_FULL_PATCH_BLEED: Turns on "full texture bleed" (full patch texture bleed is generated). This takes effect only for exporting textures.
6425 @cvar REMOVE_ALPHA: Remove the alpha channel (convert RGBA to RGB).
6426 @cvar BACKGROUND_EXPORT: When set saveAs will return immediately and exporting will occur as a background job. Background jobs may not report errors or raise exceptions.
6427 @note: These values are exposed in the parent class, but are also documented here for convenience.
6428 """
6429 DEFAULT_OPTIONS = 0
6430 DISABLE_SMALL_UNIFORMS = 1
6431 ENABLE_FULL_PATCH_BLEED = 2
6432 REMOVE_ALPHA = 4
6433 BACKGROUND_EXPORT = 8
6434
6435 DEFAULT_OPTIONS = 0
6436 DISABLE_SMALL_UNIFORMS = 1
6437 ENABLE_FULL_PATCH_BLEED = 2
6438 REMOVE_ALPHA = 4
6439 BACKGROUND_EXPORT = 8
6440
6442 """This is emitted just before the image is closed.
6443
6444 @rtype: None
6445 """
6446 pass
6447
6449 """This is emitted when the user is about to export the image.
6450
6451 @type Path: str
6452 @param Path: The path the image will be exported to
6453 @rtype: None
6454 """
6455 pass
6456
6458 """This is emitted when the user is about to import into the image.
6459
6460 @type Path: str
6461 @param Path: The path the image will be imported from
6462 @rtype: None
6463 """
6464 pass
6465
6467 """Closes the image, removing it from the image manager.
6468
6469 If the image is open in the image manager, it will be closed and removed. Not all images can be closed in this way. If the image is a member of an image set, the image set "owns" the image and will not allow it to be closed. To remove such an image, remove the image set that owns it.
6470
6471 This method can be called on all images, but images that are not in the image manager will not be closed, and an exception will be raised.
6472
6473 @rtype: None
6474 @raise RuntimeError: Raised if the image is not owned by the image manager and cannot be closed.
6475 @note: If this function successfully closes the image, the image object will become invalid.
6476 """
6477 pass
6478
6480 """Returns the colorspace configuration of the image.
6481
6482 @rtype: L{ColorspaceConfig}
6483 @return: The colorspace configuration.
6484 @see: L{setColorspaceConfig()}
6485 """
6486 pass
6487
6489 """This is emitted after the colorspace config is modified for this object.
6490
6491 @type Config: L{ColorspaceConfig}
6492 @rtype: None
6493 """
6494 pass
6495
6497 """Converts the depth of the image.
6498
6499 @type Depth: L{Image.Depth}
6500 @param Depth: The new bit depth for the image.
6501 @rtype: None
6502 """
6503 pass
6504
6506 """Copies the contents of another image into this one.
6507
6508 Mari allows very quick copying and duplication of image data. This method allows the contents of another image to be copied into this one. The image must have the same dimensions (width and height) and format as the source image, otherwise an exception will be raised. As the API does not yet allow you to alter the format of an image directly, this method is useful only when the images already have the same format (e.g. images from the same L{ImageSet}). This operation is effectively free in terms of memory usage and the user should not worry about copying large amounts of data using this method.
6509
6510 @type SourceImage: L{Image}
6511 @param SourceImage: The image to copy from
6512 @rtype: None
6513 @raise ValueError: Raised if the source or destination image is invalid, or if they are both the same image object, or if the destination image does not have the same dimensions and format as the source image.
6514 """
6515 pass
6516
6518 """Returns the bit depth of the image.
6519
6520 @rtype: L{Image.Depth}
6521 """
6522 pass
6523
6524 @staticmethod
6534
6536 """This is emitted after the image is exported.
6537
6538 @type Path: str
6539 @param Path: The path the image was exported to
6540 @rtype: None
6541 """
6542 pass
6543
6545 """Returns the path to the file that the image was loaded from.
6546
6547 This path will be valid for images loaded from disk into the image manager. Images that are contained in channels will have a blank file path.
6548
6549 @rtype: str
6550 @return: The path that the image was loaded from, or a blank string if not available
6551 @see: L{lastImportPath()}, L{lastExportPath()}
6552 """
6553 pass
6554
6556 """Returns the file space the image will import and export data as.
6557
6558 @rtype: L{Image.FileSpace}
6559 @see: L{setFileSpace()}
6560 """
6561 pass
6562
6563 - def fill(self, FillColor):
6564 """Fills the image entirely with a given color.
6565
6566 This function is the same as L{setUniformColor()}.
6567
6568 @type FillColor: L{Color}
6569 @param FillColor: The color to fill the patch with. RGB images will ignore the alpha component.
6570 @rtype: None
6571 @raise ValueError: Raised if the color provided was invalid.
6572 @see: L{uniformColor()}, L{setUniformColor()}, L{isUniform()}
6573 """
6574 pass
6575
6577 """Returns a unique identifier for this image.
6578
6579 Mari maintains hashes of images for internal book-keeping. These hashes are assumed to be universally unique (256bit skein hash). These hashes can be used to determine if an image has changed since some given checkpoint. A different hash means a different image.
6580
6581 The hash of an image is calculated from its resolution (which determines the number of tiles it uses), bit depth, and tile data. Any metadata for the image is not included. Multiple images that store the same data will have the same hash and reference the same underlying data block, which means that the L{DDI} can save memory and disk space by storing the same block of data only once.
6582
6583 @rtype: str
6584 @return: A hash string that uniquely identifies this version of this image, or an empty string on failure.
6585 """
6586 pass
6587
6588 - def height(self, MipMapLevel=0):
6589 """Returns the height of a mip-map level in the image.
6590
6591 @type MipMapLevel: int
6592 @param MipMapLevel: Mip-map level, in the range [0 to Count - 1], where 0 is the original size
6593 @rtype: int
6594 @return: The height of the mip-map level in pixels
6595 @raise ValueError: Raised if the mip-map level was out of range.
6596 """
6597 pass
6598
6600 """This is emitted after the image is imported.
6601
6602 L{Path} The path the image was imported from
6603
6604 @type Path: str
6605 @rtype: None
6606 """
6607 pass
6608
6621
6623 """Returns the last path the image was saved to.
6624
6625 @rtype: str
6626 @return: The path that the image was last saved to. This will be an empty string if the image has not been saved yet
6627 @see: L{lastImportPath()}, L{filePath()}, L{lastExportTime()}
6628 """
6629 pass
6630
6632 """Returns the date and time at which the image was last exported.
6633
6634 @rtype: QDateTime
6635 @return: The date and time of the last export, or an empty DateTime object if never exported
6636 @see: L{lastExportPath()}
6637 """
6638 pass
6639
6641 """Returns the path to the last file that was imported into the image.
6642
6643 @rtype: str
6644 @return: The path of the last file imported into the image. This will be an empty string if nothing has been imported into the image
6645 @see: L{lastImportTime()}, L{lastExportPath()}, L{filePath()}
6646 """
6647 pass
6648
6650 """Returns the date and time at which the image was last imported.
6651
6652 @rtype: QDateTime
6653 @return: The date and time of the last import, or an empty DateTime object if never imported
6654 @see: L{lastImportPath()}
6655 """
6656 pass
6657
6659 """Makes a thumbnail image from the current image contents for use by the GUI.
6660
6661 @rtype: None
6662 """
6663 pass
6664
6666 """Returns the number of mip-maps in the image.
6667
6668 @rtype: int
6669 @return: The number mip-maps in the image
6670 """
6671 pass
6672
6674 """Returns a best guess as to which file on disk represents this texture.
6675
6676 Mari keeps track of when files are imported and exported. It uses a basic heuristic to guess which file on disk represents a given Mari L{Image}.
6677
6678 The time and date of each import and export is recorded. If an image was imported more recently than Mari exported, the import image is presumed to be most relevant. If Mari exported more recently than importing, the exported version is presumed to be more relevant.
6679
6680 A couple of quick examples:
6681 - Mari import from a.png
6682 - User paints some more detail
6683 - Mari exports to b.png
6684 In this case, b.png is presumed to be most relevant and will be returned by this method.
6685 - Mari exports to a.png
6686 - User paints some more detail
6687 - User decides they don't like the changes
6688 - Mari imports from a-version2.png
6689 In this case, a-version2.png will be returned.
6690
6691 @rtype: str
6692 @return: The most relevant path or and empty string if neither importing or exporting has occured
6693 """
6694 pass
6695
6697 """Resizes the image.
6698
6699 @type NewSize: QSize
6700 @param NewSize: the desired size for the image.
6701 @rtype: None
6702 @raise ValueError: Raised if the size provided was invalid.
6703 """
6704 pass
6705
6707 """Saves the image to the given file name.
6708
6709 The I{options} parameter can be used to pass options to the file writer, in dictionary format. For example:
6710
6711 C{img.saveAs('/tmp/test.jpg', {'IntegerSetting': 1, 'StringSetting': 'Hello'})}
6712
6713 These options are currently only used by custom image writers. Please refer to the C API documentation - specifically, the MriImageReaderPlugin type and the attribute system - for details of how to develop a plug-in and read the values passed into it from this function.
6714
6715 Saving may occur in the background. If this is enabled (via the BACKGROUND_EXPORT enum from L{SaveOptions}) then saveAs will return instantly and the image will be exported on a background thread.By default background exporting is disabled and saveAs will only return when the image has been exported. When exporting in the background, errors and exceptions may not be raised on failure to save. An example of using background export would be:
6716
6717 C{img.saveAs('/tmp/test.jpg', {}, mari.Image.BACKGROUND_EXPORT)}
6718
6719 When background exporting the source image is copied internally and can be closed or modified without disrupting the background job.
6720
6721 @type FileName: str
6722 @param FileName: The absolute path, file name, and extension to save the image to.
6723 @type Options: variant
6724 @param Options: This is an optional parameter which can be used to pass options to the file writer. See above for details.
6725 @type SaveOpts: int
6726 @param SaveOpts: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{SaveOptions}.
6727 @rtype: None
6728 @raise IOError: Raised if there is a problem saving the file.
6729 @raise TypeError: Raised if the options parameter is not a dict.
6730 """
6731 pass
6732
6734 """Sets the colorspace configuration of the image.
6735
6736 @type Config: L{ColorspaceConfig}
6737 @param Config: The colorspace configuration.
6738 @rtype: None
6739 @raise ValueError: Raised if the colorspace configuration is invalid.
6740 @see: L{colorspaceConfig()}
6741 """
6742 pass
6743
6745 """Set the file space the image will import and export data as.
6746
6747 @type FileSpace: L{Image.FileSpace}
6748 @rtype: None
6749 @see: L{fileSpace()}
6750 """
6751 pass
6752
6765
6766 - def size(self, MipMapLevel=0):
6767 """Returns the size of a mip-map level in the image.
6768
6769 @type MipMapLevel: int
6770 @param MipMapLevel: Mip-map level, in the range [0 to Count - 1], where 0 is the original size
6771 @rtype: list of int
6772 @return: The size of the image in pixels, in the format: (width, height)
6773 @raise ValueError: Raised if the mip-map level was out of range.
6774 """
6775 pass
6776
6778 """Get thumbnail.
6779
6780 @rtype: QImage
6781 """
6782 pass
6783
6796
6808
6809 - def width(self, MipMapLevel=0):
6810 """Returns the width of a mip-map level in the image.
6811
6812 @type MipMapLevel: int
6813 @param MipMapLevel: Mip-map level, in the range [0 to Count - 1], where 0 is the original size
6814 @rtype: int
6815 @return: The width of the mip-map level in pixels
6816 @raise ValueError: Raised if the mip-map level was out of range.
6817 """
6818 pass
6819
6822 """Objects of this class hold a matrix 4x4.
6823
6824 B{Example Code}
6825 """
6826
6828 """Returns the elements of the matrix as a list of 16 values.
6829
6830 @rtype: tuple of double
6831 @return: The elements of the matrix
6832 """
6833 pass
6834
6836 """Returns the length of the vector.
6837
6838 This is the same as size().
6839
6840 @rtype: int
6841 @return: The length of the vector
6842 """
6843 pass
6844
6847 """Projectors store the specific camera details of a particular view.
6848
6849 This includes the rotation, zoom, and orientation of the view, plus the current paintable area, painting mode, and mask settings. This is much like a bookmark or snapshot of a view.
6850
6851 You can access projectors through the L{ProjectorManager} - for example: C{mari.projectors.list()}
6852
6853 B{Example Code}
6854
6855 >>> # This example shows how to the path of the quick projector
6856 >>> import mari
6857 >>> mari.projectors.quick().setPath("/tmp/quick_unprojection.png")
6858
6859 @cvar DEPTH_BYTE: Standard eight bit depth.
6860 @cvar DEPTH_HALF: Half-float depth.
6861 @cvar DEPTH_FLOAT: Full float depth.
6862 """
6863
6865 """These are the bit depths supported by projectors.
6866 @cvar DEPTH_BYTE: Standard eight bit depth.
6867 @cvar DEPTH_HALF: Half-float depth.
6868 @cvar DEPTH_FLOAT: Full float depth.
6869 @note: These values are exposed in the parent class, but are also documented here for convenience.
6870 """
6871 DEPTH_BYTE = 8
6872 DEPTH_HALF = 16
6873 DEPTH_FLOAT = 32
6874
6875 DEPTH_BYTE = 8
6876 DEPTH_HALF = 16
6877 DEPTH_FLOAT = 32
6878
6880 """These are where lighting information can be placed.
6881 @note: These values are exposed in the parent class, but are also documented here for convenience.
6882 """
6883 NONE = 0
6884 FILE = 1
6885 LAYER = 2
6886
6887 NONE = 0
6888 FILE = 1
6889 LAYER = 2
6890
6892 """Returns the current bit depth of the projector.
6893
6894 @rtype: L{BitDepth}
6895 @return: The current bit depth of the projector
6896 @see: L{setBitDepth()}
6897 """
6898 pass
6899
6901 """Returns the color clamping behavior of the projector.
6902
6903 @rtype: bool
6904 @return: True if the colors are clamped to the 0..1 range on output, or False otherwise
6905 @see: L{setClampColors()}
6906 """
6907 pass
6908
6910 """Returns the pixel height of the projection.
6911
6912 @rtype: int
6913 @return: The height in pixels of the projection
6914 """
6915 pass
6916
6918 """Returns the detail level of the lighting calculations.
6919
6920 @rtype: L{LightingMode}
6921 @return: The current lighting mode
6922 @deprecated: This function no longer does anything. It will be removed in a future version.
6923 @see: L{setLightingMode()}
6924 """
6925 pass
6926
6928 """Returns the file path to export the projection to.
6929
6930 @rtype: str
6931 @return: The file path that projection images are exported to
6932 @see: setExportPath(), L{setPath()}
6933 """
6934 pass
6935
6937 """Sets the bit depth of the projector.
6938
6939 When unprojecting, the projector can render at varying bit depths. This method give control over the bit depth used.
6940
6941 @type Depth: L{BitDepth}
6942 @param Depth: The bit depth of the unprojection image. This should be suitable for the output image format - e.g. unprojecting to a PNG file with floating point bit depth will fail.
6943 @rtype: None
6944 @raise ValueError: Raised if the bit depth provided was invalid.
6945 @see: L{bitDepth()}
6946 """
6947 pass
6948
6950 """Sets the color clamping behavior of the projector.
6951
6952 @type ClampColors: bool
6953 @param ClampColors: True to clamp the colors to the 0..1 range, or False to not clamp
6954 @rtype: None
6955 @see: L{clampColors()}
6956 """
6957 pass
6958
6960 """Sets the detail level of the lighting calculations.
6961
6962 @type NewMode: L{LightingMode}
6963 @param NewMode: The new lighting mode
6964 @rtype: None
6965 @raise ValueError: Raised if the requested mode is not supported by the specified file format.
6966 @deprecated: This function no longer does anything. It will be removed in a future version.
6967 @see: L{lightingMode()}
6968 """
6969 pass
6970
6972 """Sets the path that the projector will export images to.
6973
6974 @type Path: str
6975 @param Path: The file path to export projection images to
6976 @rtype: None
6977 @see: exportPath(), L{path()}
6978 """
6979 pass
6980
6981 - def setSize(self, Width, Height):
6982 """Sets the projection size in pixels.
6983
6984 @type Width: int
6985 @type Height: int
6986 @rtype: None
6987 @raise ValueError: Raised if the requested size is not supported.
6988 """
6989 pass
6990
6992 """Returns the pixel width of the projection.
6993
6994 @rtype: int
6995 @return: The width in pixels of the projection
6996 """
6997 pass
6998
7001 """A numeric slider widget.
7002
7003 Provides a custom line edit widget, which accepts integers (the default) or floating point values. B{Example Code}
7004
7005 >>> # This example creates a new FloatSlider object, add it to a QWidget and show it
7006 >>> import mari
7007 >>> import PySide
7008 >>> line_edit = mari.LineEdit()
7009 >>> container = PySide.QtGui.QWidget()
7010 >>> container.setLayout(PySide.QtGui.QHBoxLayout())
7011 >>> line_edit.addToLayout(container.layout())
7012 >>> container.show()
7013
7014 @group Signals: lostFocus, movedMouse
7015 """
7016
7018 """Adds a validator to provided range checking of floating-point numbers.
7019
7020 @type Minimum: float
7021 @param Minimum: The minimum value accepted.
7022 @type Maximum: float
7023 @param Maximum: The maximum value accepted.
7024 @type Precision: int
7025 @param Precision: The number of decimal places accepted.
7026 @rtype: None
7027 """
7028 pass
7029
7031 """Adds the line edit to the given layout.
7032
7033 @type Layout: QLayout
7034 @param Layout: The layout to add the line edit widget to
7035 @rtype: None
7036 @raise ValueError: Raised if the given layout is null.
7037 """
7038 pass
7039
7041 """Disables or re-enables the emission of signals from the object.
7042
7043 If L{Block} is True, this will block the emission of signals from this object - i.e., emitting a signal will not invoke anything connected to it. If L{Block} is False, any previous blocking will be deactivated.
7044
7045 Signals are always enabled by default.
7046
7047 When using this function, you should store the return value, which is the previous setting for whether signals were blocked. When your processing has finished, you should call this function again with the previous value. This will ensure that signals will not be re-enabled earlier than intended.
7048
7049 @type Block: bool
7050 @param Block: True to block signals, or False to unblock them - but see above for why this should generally be called with a stored value instead of an explicit False
7051 @rtype: bool
7052 @return: The previous value of whether signals were blocked.
7053 """
7054 pass
7055
7056 - def home(self, Mark):
7057 """Moves the text cursor to the beginning of the line unless it is already there.
7058
7059 @type Mark: bool
7060 @param Mark: If True, text is selected towards the first position; otherwise, any selected text is unselected if the cursor is moved.
7061 @rtype: None
7062 """
7063 pass
7064
7066 """Returns whether the line edit is enabled.
7067
7068 @rtype: bool
7069 """
7070 pass
7071
7073 """Returns whether the line edit is read only.
7074
7075 @rtype: bool
7076 """
7077 pass
7078
7080 """This is emitted when the line edit loses focus.
7081
7082 @rtype: None
7083 """
7084 pass
7085
7087 """Returns the maximum height in pixels.
7088
7089 @rtype: int
7090 @see: L{setMaximumHeight()}
7091 """
7092 pass
7093
7095 """Returns the maximum width in pixels.
7096
7097 @rtype: int
7098 @see: L{setMaximumWidth()}
7099 """
7100 pass
7101
7103 """This is emitted when the mouse is dragged from the line edit.
7104
7105 @type YPosition: int
7106 @param YPosition: The relative y position of the cursor.
7107 @rtype: None
7108 """
7109 pass
7110
7112 """Sets whether the line edit is enabled.
7113
7114 @type Enabled: bool
7115 @rtype: None
7116 """
7117 pass
7118
7120 """Sets the maximum height in pixels.
7121
7122 @type Maximum: int
7123 @rtype: None
7124 @see: L{maximumHeight()}
7125 """
7126 pass
7127
7129 """Sets the maximum width in pixels.
7130
7131 @type Maximum: int
7132 @rtype: None
7133 @see: L{maximumWidth()}
7134 """
7135 pass
7136
7138 """Sets the range of the line edit.
7139
7140 @type Range: int
7141 @param Range: The range to set on the line edit.
7142 @rtype: None
7143 """
7144 pass
7145
7147 """Sets whether the line edit is read only.
7148
7149 @type ReadOnly: bool
7150 @rtype: None
7151 """
7152 pass
7153
7154 - def setText(self, Text):
7155 """Sets the text entered in the line edit.
7156
7157 @type Text: str
7158 @rtype: None
7159 @see: L{text()}
7160 """
7161 pass
7162
7164 """Sets the value of the slider.
7165
7166 @type Value: int
7167 @param Value: The value to set the slider to.
7168 @rtype: None
7169 """
7170 pass
7171
7173 """Returns the entered text.
7174
7175 @rtype: str
7176 @see: L{setText()}
7177 """
7178 pass
7179
7180 - def __init__(self, Parent=None, Value=0, Range=0):
7181 """Sets to the int slider specified by the given components.
7182
7183 @type Parent: QWidget
7184 @type Value: int
7185 @type Range: int
7186 @rtype: L{LineEdit}
7187 """
7188 pass
7189
7192 """This encapsulates a geometry operation that can be performed on a Geo Entity.
7193
7194 You can access the registered geometry operations through the EntityManager - for example:
7195
7196 C{mari.geo.geometryOperationList()}
7197 """
7198
7199 - def execute(self, Operation, GeometryEntity, GeoVersion, QuerySubdivisionMesh, SubdivisionLevel, ExtraParams=None):
7200 """Executes the geometry operation for the current frame.
7201
7202 @type Operation: str
7203 @param Operation: The sub-operation to execute.
7204 @type GeometryEntity: L{GeoEntity}
7205 @param GeometryEntity: The L{GeoEntity} that we want to query info for.
7206 @type GeoVersion: L{GeoEntityVersion}
7207 @param GeoVersion: The Version,within the Geo Entity, that we want to query.
7208 @type QuerySubdivisionMesh: bool
7209 @param QuerySubdivisionMesh: Flag to toggle querying subdivision meshes or original meshes.
7210 @type SubdivisionLevel: int
7211 @param SubdivisionLevel: Subdivision level to query for subdivision meshes.
7212 @type ExtraParams: variant
7213 @param ExtraParams: Extra parameters for the image operation.
7214 @rtype: bool
7215 @return: The result of the operation.
7216 """
7217 pass
7218
7220 """Returns the name of the operation.
7221
7222 @rtype: str
7223 @return: The name of the operation.
7224 """
7225 pass
7226
7228 """Returns the description of one of the operations.
7229
7230 @type Name: str
7231 @param Name: The sub-operation whose description we require.
7232 @rtype: str
7233 @return: The description corresponding to the operation.
7234 """
7235 pass
7236
7238 """Returns the supported operations by this object.
7239
7240 @rtype: list of str
7241 @return: The supported operations.
7242 """
7243 pass
7244
7245
7246 -class Ptex(Metadata):
7247 """Provides L{Ptex} image set scripting.
7248
7249 @see: U{http://ptex.us<http://ptex.us>}
7250 """
7251
7253 """Doubles the size of the texture of the L{Ptex} face.
7254
7255 @type FaceId: int
7256 @param FaceId: The ID of the face to double the size of.
7257 @rtype: None
7258 @raise RuntimeError: Raised if an error was detected during face resizing.
7259 """
7260 pass
7261
7262 - def exportToPtexFile(self, PtexPathName, IncludeGeo, IncludeAdjacency, GenerateMipMaps, IncludeUserAttributes, RemapQuads):
7263 """Exports an image set as a L{Ptex} file.
7264
7265 @type PtexPathName: str
7266 @param PtexPathName: L{Ptex} path name to export to.
7267 @type IncludeGeo: bool
7268 @param IncludeGeo: Include geometry as meta data.
7269 @type IncludeAdjacency: bool
7270 @param IncludeAdjacency: Include adjacency information.
7271 @type GenerateMipMaps: bool
7272 @param GenerateMipMaps: Generate mipmaps using the L{Ptex} library.
7273 @type IncludeUserAttributes: bool
7274 @param IncludeUserAttributes: Include user attributes from the image set.
7275 @type RemapQuads: bool
7276 @param RemapQuads: Remap all quad face texture data from triangle layout to quad layout.
7277 @rtype: None
7278 @raise RuntimeError: Raised if an error was detected while exporting to the .ptx file.
7279 """
7280 pass
7281
7283 """Returns the number of faces in this L{Ptex} texture.
7284
7285 @rtype: int
7286 @return: The face count.
7287 @deprecated: This method will be removed in a future version. Please use L{geoFaceCount()} instead.
7288 """
7289 pass
7290
7292 """Returns the size in pixels of the given face.
7293
7294 @type FaceId: int
7295 @param FaceId: The ID of the face to query.
7296 @rtype: QSize
7297 @return: The size in pixels of the face.
7298 """
7299 pass
7300
7302 """Floodfills a face within the L{Ptex} texture to a given color.
7303
7304 @type FaceId: int
7305 @type FillColor: L{Color}
7306 @rtype: None
7307 @raise RuntimeError: Raised if an error was detected while flooding filling faces. FaceId The ID of the face to fill. FillColor The color that the face will be filled with.
7308 """
7309 pass
7310
7312 """Returns the number of faces in this L{Ptex} texture.
7313
7314 @rtype: int
7315 @return: The total face count of the various geometries contained in a GeoVersion.
7316 """
7317 pass
7318
7320 """Halves the size of the texture of the L{Ptex} face.
7321
7322 @type FaceId: int
7323 @param FaceId: The ID of the face to halve the size of.
7324 @rtype: None
7325 @raise RuntimeError: Raised if an error was detected during face resizing.
7326 """
7327 pass
7328
7330 """Returns a unique identifier for this L{Ptex} image set.
7331
7332 Mari maintains hashes of ptex data for internal book-keeping. These hashes are assumed to be universally unique (256bit skein hash). These hashes can be used to determine if an L{Ptex} image set has changed since some given checkpoint. A different hash means different ptex data.
7333
7334 @rtype: str
7335 @return: A hash string that uniquely identifies this version of this L{Ptex} image set, or an empty string on failure.
7336 """
7337 pass
7338
7340 """Import a compatible L{Ptex} file onto an existing image set.
7341
7342 @type PtexPathName: str
7343 @param PtexPathName: L{Ptex} pathname to import from.
7344 @type RemapQuads: bool
7345 @param RemapQuads: Remap all quad face texture data from quad layout to triangle layout.
7346 @rtype: None
7347 @raise RuntimeError: Raised if an error was detected while importing from the .ptx file.
7348 """
7349 pass
7350
7352 """Resizes a face within the L{Ptex} texture.
7353
7354 @type FaceId: int
7355 @param FaceId: The ID of the face to resize.
7356 @type NewSize: QSize
7357 @param NewSize: The new size of the face. This must be a size returned by L{validFaceSizes()}.
7358 @rtype: None
7359 @raise RuntimeError: Raised if an error was detected during face resizing.
7360 """
7361 pass
7362
7364 """Resizes a face within the L{Ptex} texture to a world space texel density.
7365
7366 @type FaceId: int
7367 @param FaceId: The ID of the face to resize.
7368 @type Density: float
7369 @param Density: The texel density to use in the resize calculations.
7370 @rtype: None
7371 @raise RuntimeError: Raised if an error was detected during face resizing.
7372 """
7373 pass
7374
7376 """Returns the list of valid face sizes for L{Ptex} faces.
7377
7378 @rtype: list of int
7379 @return: A list of valid face sizes.
7380 """
7381 pass
7382
7384 """Constructs a new L{Ptex} wrapper.
7385
7386 This is a helper class for dealing with L{Ptex} image sets. It should be constructed by passing in a pointer to an existing L{Ptex} image set.
7387
7388 @type pPtexImageSet: L{ImageSet}
7389 @param pPtexImageSet: A pointer to an L{ImageSet} object to wrap
7390 @rtype: L{Ptex}
7391 """
7392 pass
7393
7396 """This provides access to Mari's resource paths and some related system functions.
7397
7398 The paths supplied should be accessed using a string identifier returned from one of the appropriate functions. Note that new paths cannot currently be registered through scripting.
7399
7400 The current value of a path can be accessed with code like the following: C{mari.resources.path(mari.resources.USER_SCRIPTS)}
7401
7402 Many paths can be overridden by environment variables that match their string identifiers. For example, C{mari.resources.USER_SCRIPTS} is set to the string "MARI_SCRIPT_PATH", and if an environment variable with that name is found when Mari launches, the user scripts path will be set to its contents.
7403
7404 The paths that can be modified by users will generally have string identifiers that begin with "MARI_", which also makes the environment variables clearer. Alternatively, an individual path can be checked for modifiability by calling C{mari.scripts.setPath()} on it; the function will raise an exception if the path is not user-modifiable.
7405
7406 B{Example Code}
7407
7408 >>> # This example shows how to obtain the path to example directory
7409 >>> import mari
7410 >>> example_dir_path = mari.resources.path(mari.resources.EXAMPLES)
7411
7412 @see: L{examples.resource_info}
7413 @group System Paths: CAPI_EXAMPLES, CERTIFICATES, COLOR, C_API_DOCS, EXAMPLES, GRADIENTS, HELP, ICONS, IMAGES, LOGOS, LUTS, MEDIA, MISC, QT_PLUGINS, SCRIPT_DOCS, SETTINGS, SHADERS, SYSTEM_SCRIPTS
7414 @group User Paths: DEFAULT_ARCHIVE, DEFAULT_CAMERA, DEFAULT_EXPORT, DEFAULT_GEO, DEFAULT_IMAGE, DEFAULT_IMPORT, DEFAULT_RENDER, DEFAULT_SHELF, USER, USER_PLUGINS, USER_SCRIPTS
7415 """
7416
7417 CAPI_EXAMPLES = 'CAPI_EXAMPLES'
7418 CERTIFICATES = 'CERTIFICATES'
7419 COLOR = 'COLOR'
7420 C_API_DOCS = 'C_API_DOCS'
7421 DEFAULT_ARCHIVE = 'MARI_DEFAULT_ARCHIVE_PATH'
7422 DEFAULT_CAMERA = 'MARI_DEFAULT_CAMERA_PATH'
7423 DEFAULT_EXPORT = 'MARI_DEFAULT_EXPORT_PATH'
7424 DEFAULT_GEO = 'MARI_DEFAULT_GEOMETRY_PATH'
7425 DEFAULT_IMAGE = 'MARI_DEFAULT_IMAGE_PATH'
7426 DEFAULT_IMPORT = 'MARI_DEFAULT_IMPORT_PATH'
7427 DEFAULT_RENDER = 'MARI_DEFAULT_RENDER_PATH'
7428 DEFAULT_SHELF = 'MARI_DEFAULT_SHELF_PATH'
7429 EXAMPLES = 'EXAMPLES'
7430 GRADIENTS = 'GRADIENTS'
7431 HELP = 'HELP'
7432 ICONS = 'ICONS'
7433 IMAGES = 'IMAGES'
7434 LOGOS = 'LOGOS'
7435 LUTS = 'LUTS'
7436 MEDIA = 'MEDIA'
7437 MISC = 'MISC'
7438 QT_PLUGINS = 'QT_PLUGINS'
7439 SCRIPT_DOCS = 'SCRIPT_DOCS'
7440 SETTINGS = 'SETTINGS'
7441 SHADERS = 'SHADERS'
7442 SYSTEM_SCRIPTS = 'SCRIPTS'
7443 USER = 'MARI_USER_PATH'
7444 USER_PLUGINS = 'MARI_PLUGINS_PATH'
7445 USER_SCRIPTS = 'MARI_SCRIPT_PATH'
7447 """Constructs a QIcon for the given file name from Mari's stock icon library.
7448
7449 @type IconFileName: str
7450 @param IconFileName: The file name of the icon in Mari's stock icon library
7451 @rtype: QIcon
7452 @return: object for the given icon file name
7453 """
7454 pass
7455
7457 """Returns the list of plugin paths specified by environment variable MARI_CUSTOM_PLUGINS_PATH.
7458
7459 @rtype: list of str
7460 """
7461 pass
7462
7464 """Refreshes all environment paths to mari default values, instead of reading from the environment.
7465
7466 @rtype: None
7467 """
7468 pass
7469
7471 """Returns the default template used for flattened image sequences.
7472
7473 @rtype: str
7474 @return: The default template used for flattened image sequences
7475 @see: L{setFlattenedSequenceTemplate()}
7476 """
7477 pass
7478
7479 - def path(self, Key):
7480 """Retrieves the value of a registered path as a single string.
7481
7482 The available registered paths are listed in the I{System Paths} and I{User Paths} sections above.
7483
7484 @type Key: str
7485 @param Key: The string identifier of the path.
7486 @rtype: str
7487 @return: The value of the path.
7488 @raise AttributeError: Raised if the supplied key does not match a path entry.
7489 @see: L{pathList()}, L{setPath()}
7490 """
7491 pass
7492
7494 """Retrieves the value of a registered path as a list of strings.
7495
7496 The available registered paths are listed in the I{System Paths} and I{User Paths} sections above.
7497
7498 The strings are combined into a single one by joining with instances of the standard path specifier - ':' on Linux/OS X, and ';' on Windows.
7499
7500 @type Key: str
7501 @param Key: The string identifier of the path.
7502 @rtype: list of str
7503 @return: A list of the values in the path.
7504 @raise AttributeError: Raised if the supplied key does not match a path entry.
7505 @see: L{setPathList()}, L{path()}
7506 """
7507 pass
7508
7510 """Returns the default template used for flattened L{Ptex} image sequences.
7511
7512 @rtype: str
7513 @return: The default template used for flattened L{Ptex} image sequences
7514 @see: L{setPtexFlattenedSequenceTemplate()}
7515 """
7516 pass
7517
7519 """Returns the default template used for L{Ptex} image sequences.
7520
7521 @rtype: str
7522 @return: The default template used for L{Ptex} image sequences
7523 @see: L{setPtexSequenceTemplate()}
7524 """
7525 pass
7526
7528 """Refreshes all paths from environment variables to account for any changes.
7529
7530 This calls L{refreshPath()} for all available paths.
7531
7532 This is used to take into account any path modifications applied by environment variable changes on start up. The standard start up process calls this function when setting up the 'mari' module so that users can set up their environment variables for paths using Python's C{sitecustomize.py} if desired.
7533
7534 @rtype: None
7535 """
7536 pass
7537
7539 """Refreshes the given path from its environment variable, in case of any changes.
7540
7541 If the specified path is read from an environment variable (see L{ResourceInfo} for details), this will look for the variable, and if found and non-empty, it will set the path to the corresponding value.
7542
7543 For paths that are not read from environment variables, or not modifiable by the user, this operation will do nothing.
7544
7545 @type Key: str
7546 @rtype: None
7547 @raise AttributeError: Raised if the supplied key does not match a path entry.
7548 """
7549 pass
7550
7552 """Returns the default template used for image sequences.
7553
7554 @rtype: str
7555 @return: The default template used for image sequences
7556 @see: L{setSequenceTemplate()}
7557 """
7558 pass
7559
7561 """Returns the token that should be used to identity sequences of images.
7562
7563 @rtype: str
7564 @return: The token to identify image sequences
7565 @see: L{setSequenceToken()}
7566 """
7567 pass
7568
7570 """Sets the default template used for flattened image sequences.
7571
7572 @type Name: str
7573 @param Name: The new default template to use for flattened image sequences
7574 @rtype: None
7575 @see: L{flattenedSequenceTemplate()}
7576 """
7577 pass
7578
7580 """Sets the value of a registered path to a single string.
7581
7582 The available registered paths are listed in the I{System Paths} and I{User Paths} sections above.
7583
7584 Note that no new paths can be registered through scripting at this stage.
7585
7586 @type Key: str
7587 @param Key: The string identifier of the path.
7588 @type NewPath: str
7589 @param NewPath: The new value for the path. This must not be empty.
7590 @rtype: None
7591 @raise AttributeError: Raised if the supplied key does not match a path entry.
7592 @raise ValueError: Raised if the new path is empty.
7593 @raise RuntimeError: Raised if the path is not user-modifiable.
7594 @see: L{setPathList()}, L{path()}
7595 """
7596 pass
7597
7599 """Sets the value of a registered path to a list of strings.
7600
7601 The strings are combined into a single one by joining with instances of the standard path specifier - ':' on Linux/OS X, and ';' on Windows.
7602
7603 The available registered paths are listed in the I{System Paths} and I{User Paths} sections above.
7604
7605 Note that no new paths can be registered through scripting at this stage.
7606
7607 @type Key: str
7608 @param Key: The string identifier of the path.
7609 @type NewPathList: list of str
7610 @param NewPathList: The new value for the path. If this is empty, the path is not changed.
7611 @rtype: None
7612 @raise AttributeError: Raised if the supplied key does not match a path entry.
7613 @raise ValueError: Raised if NewPathList is empty.
7614 @raise RuntimeError: Raised if the path is not user-modifiable.
7615 @see: L{pathList()}, L{setPath()}
7616 """
7617 pass
7618
7620 """Sets the default template used for flattened L{Ptex} image sequences.
7621
7622 @type Name: str
7623 @param Name: The new default template to use for flattened L{Ptex} image sequences
7624 @rtype: None
7625 @see: L{ptexFlattenedSequenceTemplate()}
7626 """
7627 pass
7628
7630 """Sets the default template used for L{Ptex} image sequences.
7631
7632 @type Name: str
7633 @param Name: The new default template to use for L{Ptex} image sequences
7634 @rtype: None
7635 @see: L{ptexSequenceTemplate()}
7636 """
7637 pass
7638
7640 """Sets the default template used for image sequences.
7641
7642 @type Name: str
7643 @param Name: The new default template to use for image sequences
7644 @rtype: None
7645 @see: L{sequenceTemplate()}
7646 """
7647 pass
7648
7650 """Sets the sequence token to be used to replace the number in a sequence of images.
7651
7652 By default, this is "$INDEX". Other examples are: $UDIM (WETA), @, ####
7653
7654 @type Token: str
7655 @param Token: The new sequence token to use.
7656 @rtype: None
7657 @see: L{sequenceToken()}
7658 """
7659 pass
7660
7662 """Returns the path to the given settings file.
7663
7664 This allows a settings file to be overridden in a local settings folder.
7665
7666 @type Name: str
7667 @param Name: The file name of the settings file to retrieve the path for
7668 @rtype: str
7669 @return: The resolved file path. This is not guaranteed to exist.
7670 """
7671 pass
7672
7674 """Displays a PDF file in the system's default viewer.
7675
7676 @type Path: str
7677 @param Path: The file path of the PDF to view
7678 @rtype: None
7679 """
7680 pass
7681
7683 """Displays a URL in the system's default web browser.
7684
7685 @type Url: str
7686 @param Url: The URL of the web site to display.
7687 @rtype: None
7688 @raise ValueError: Raised if the URL is invalid.
7689 @raise RuntimeError: Raised if the external browser could not be successfully launched.
7690 """
7691 pass
7692
7693 resources = ResourceInfo()
7697 """
7698 @cvar COLORSPACE_STAGE_NATIVE: Colorspace of the raw data.
7699 @cvar COLORSPACE_STAGE_OUTPUT: Colorspace to export the data out in.
7700 @cvar COLORSPACE_STAGE_WORKING: Colorspace used when working with the data.
7701 @cvar COLORSPACE_STAGE_COUNT: Total number of colorspace stages.
7702 @cvar COLORSPACE_TYPE_INT8: 8 bit integer.
7703 @cvar COLORSPACE_TYPE_INT16: Integer more than 8 bits (not half float).
7704 @cvar COLORSPACE_TYPE_FLOAT: Floating-point (including half float and double).
7705 @cvar COLORSPACE_TYPE_COUNT: Total number of colorspace data types.
7706 """
7707
7709 """These are used to define a particular point in the pipeline when a colorspace can be defined.
7710 @cvar COLORSPACE_STAGE_NATIVE: Colorspace of the raw data.
7711 @cvar COLORSPACE_STAGE_OUTPUT: Colorspace to export the data out in.
7712 @cvar COLORSPACE_STAGE_WORKING: Colorspace used when working with the data.
7713 @cvar COLORSPACE_STAGE_COUNT: Total number of colorspace stages.
7714 @note: These values are exposed in the parent class, but are also documented here for convenience.
7715 """
7716 COLORSPACE_STAGE_NATIVE = 0
7717 COLORSPACE_STAGE_OUTPUT = 1
7718 COLORSPACE_STAGE_WORKING = 2
7719 COLORSPACE_STAGE_COUNT = 3
7720
7721 COLORSPACE_STAGE_NATIVE = 0
7722 COLORSPACE_STAGE_OUTPUT = 1
7723 COLORSPACE_STAGE_WORKING = 2
7724 COLORSPACE_STAGE_COUNT = 3
7725
7727 """These are used to define the data types used by colorspaces.
7728 @cvar COLORSPACE_TYPE_INT8: 8 bit integer.
7729 @cvar COLORSPACE_TYPE_INT16: Integer more than 8 bits (not half float).
7730 @cvar COLORSPACE_TYPE_FLOAT: Floating-point (including half float and double).
7731 @cvar COLORSPACE_TYPE_COUNT: Total number of colorspace data types.
7732 @note: These values are exposed in the parent class, but are also documented here for convenience.
7733 """
7734 COLORSPACE_TYPE_INT8 = 0
7735 COLORSPACE_TYPE_INT16 = 1
7736 COLORSPACE_TYPE_FLOAT = 2
7737 COLORSPACE_TYPE_COUNT = 3
7738
7739 COLORSPACE_TYPE_INT8 = 0
7740 COLORSPACE_TYPE_INT16 = 1
7741 COLORSPACE_TYPE_FLOAT = 2
7742 COLORSPACE_TYPE_COUNT = 3
7743
7745 """Returns the automatic colorspace or role for a particular stage.
7746
7747 @type Stage: L{ColorspaceStage}
7748 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7749 @rtype: str
7750 @return: The automatic colorspace or role of the pipeline stage.
7751 @raise IndexError: Raised if the stage index is out of range.
7752 @see: L{setAutomaticColorspace()}
7753 """
7754 pass
7755
7757 """Returns the automatic data type for either the native and output stages.
7758
7759 @type Stage: L{ColorspaceStage}
7760 @param Stage: The stage in which a data type can be defined.
7761 @rtype: L{ColorspaceType}
7762 @return: The automatic data type of the pipeline stage.
7763 @raise IndexError: Raised if the stage index is neither the native or output stage.
7764 @see: L{setAutomaticType()}
7765 """
7766 pass
7767
7769 """Returns a list of all the available colorspaces and roles present in the OCIO config file for a particular stage.
7770
7771 If COLORSPACE_STAGE_COUNT is passed in for L{Stage} then only the colorspaces and roles defined in the OCIO config file will be checked and none of the extras for the stages such as 'Automatic'.
7772
7773 @type Stage: L{ColorspaceStage}
7774 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7775 @rtype: list of str
7776 @return: The list of colorspaces and roles within the OCIO config file for a particular stage.
7777 @raise IndexError: Raised if the stage index is out of range.
7778 """
7779 pass
7780
7782 """Returns the colorspace or role for a particular stage.
7783
7784 This may not actually be a colorspace or role within the OCIO config file. Please use 'resolveColorSpace' to get the actual colorspace name.
7785
7786 @type Stage: L{ColorspaceStage}
7787 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7788 @rtype: str
7789 @return: The colorspace or role of the pipeline stage.
7790 @raise IndexError: Raised if the stage index is out of range.
7791 @see: L{setColorspace()}
7792 """
7793 pass
7794
7796 """Returns the default colorspace or role for a particular stage.
7797
7798 @type Stage: L{ColorspaceStage}
7799 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7800 @rtype: str
7801 @return: The default colorspace or role of the pipeline stage.
7802 @raise IndexError: Raised if the stage index is out of range.
7803 """
7804 pass
7805
7807 """Returns the OCIO config file.
7808
7809 This may not actually be a name or path of a OCIO config file. Please use 'resolveFileName' to get the actual name or path.
7810
7811 @rtype: str
7812 @see: L{setFileName()}
7813 """
7814 pass
7815
7817 """Returns True if the given colorspace or role is present in the OCIO config file and is valid for a particular stage.
7818
7819 If COLORSPACE_STAGE_COUNT is passed in for L{Stage} then only the colorspaces and roles defined in the OCIO config file will be checked and none of the extras for the stages such as 'Automatic'.
7820
7821 @type Colorspace: str
7822 @param Colorspace: The colorspace or role to look for.
7823 @type Stage: L{ColorspaceStage}
7824 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7825 @type Strict: bool
7826 @param Strict: When set the automatic colorspaces are parsed to determine whether they can be resolved to an actual colorspace within the OCIO config file.
7827 @rtype: bool
7828 @return: True if the colorspace or role is present in the OCIO config file and is valid for the stage, False otherwise.
7829 @raise IndexError: Raised if the stage index is out of range.
7830 """
7831 pass
7832
7834 """Returns True if the OCIO config file is not one of the standard ones packaged with Mari.
7835
7836 @rtype: bool
7837 """
7838 pass
7839
7841 """Returns True if the OCIO config file is valid.
7842
7843 @rtype: bool
7844 """
7845 pass
7846
7848 """Returns True if the OCIO config file and corresponding colorspace stages are valid.
7849
7850 @rtype: bool
7851 """
7852 pass
7853
7855 """Returns whether the configuration is enabled and to be used to convert data between colorspaces.
7856
7857 @rtype: bool
7858 @return: True if the configuration is enabled.
7859 @see: L{setRaw()}
7860 """
7861 pass
7862
7864 """Sets both the OCIO config file and each of the colorspace stages to their default.
7865
7866 @rtype: None
7867 """
7868 pass
7869
7871 """Returns the colorspace found within the OCIO config file for a particular stage.
7872
7873 @type Stage: L{ColorspaceStage}
7874 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7875 @rtype: str
7876 @return: The colorspace of the pipeline stage.
7877 @raise IndexError: Raised if the stage index is out of range.
7878 """
7879 pass
7880
7882 """Returns the name or path of the OCIO config file.
7883
7884 @rtype: str
7885 """
7886 pass
7887
7889 """Returns whether the configuration should be used to convert between color-spaces.
7890
7891 This takes into consideration, not only the internal flag, the global default raw option and whether the L{OpenColorIO} is valid.
7892
7893 @rtype: bool
7894 """
7895 pass
7896
7898 """Returns whether the configuration is targeting masks, heights, normals, depths, and other non-color images.
7899
7900 @rtype: bool
7901 @return: True if the configuration is targeting non-color data.
7902 @see: L{setScalar()}
7903 """
7904 pass
7905
7907 """Sets the automatic colorspace or role for a particular stage.
7908
7909 @type Stage: L{ColorspaceStage}
7910 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7911 @type Colorspace: str
7912 @param Colorspace: The automatic colorspace or role of the pipeline stage.
7913 @rtype: None
7914 @raise IndexError: Raised if the stage index is out of range.
7915 @raise ValueError: Raised if an invalid colorspaces, for the OCIO config file, is given.
7916 @see: L{automaticColorspace()}
7917 """
7918 pass
7919
7921 """Sets the automatic data type for either the native and output stages.
7922
7923 @type Stage: L{ColorspaceStage}
7924 @param Stage: The stage in which a data type can be defined.
7925 @type Type: L{ColorspaceType}
7926 @param Type: The automatic data type of the pipeline stage.
7927 @rtype: None
7928 @raise IndexError: Raised if the stage index is neither the native or output stage.
7929 @see: L{automaticType()}
7930 """
7931 pass
7932
7934 """Sets the colorspace or role for a particular stage.
7935
7936 @type Stage: L{ColorspaceStage}
7937 @param Stage: The stage in the pipeline where a colorspace or role can be defined.
7938 @type Colorspace: str
7939 @param Colorspace: The new colorspace or role of the stage in the pipeline.
7940 @rtype: None
7941 @raise IndexError: Raised if the stage index is out of range.
7942 @raise ValueError: Raised if an invalid colorspaces, for the OCIO config file, is given.
7943 @see: L{colorspace()}
7944 """
7945 pass
7946
7948 """Sets the OCIO config file.
7949
7950 This causes the stages to be validated and updated to sensible defaults if they aren't within the new OCIO config file.
7951
7952 @type FileName: str
7953 @param FileName: Either the name of a standard OCIO config file packaged with Mari or a path to a custom one.
7954 @rtype: None
7955 @see: L{fileName()}
7956 """
7957 pass
7958
7960 """Sets whether the configuration is enabled and to be used to convert data between colorspaces.
7961
7962 @type Enable: bool
7963 @param Enable: Whether the configuration is enabled.
7964 @rtype: None
7965 @see: L{raw()}
7966 """
7967 pass
7968
7970 """Sets whether the configuration is targeting masks, heights, normals, depths, and other non-color images.
7971
7972 @type Enable: bool
7973 @param Enable: Whether the configuration is targeting non-color data.
7974 @rtype: None
7975 @see: L{scalar()}
7976 """
7977 pass
7978
7980 """Returns a string representation of the color space.
7981
7982 @rtype: str
7983 @return: Colorspace data.
7984 """
7985 pass
7986
7987 - def __init__(self, FileName="", ColorSpaces=[], AutomaticTypes=[], Raw=False, Scalar=False):
7988 """Creates a new colorspace config.
7989
7990 @type FileName: str
7991 @type ColorSpaces: list of str
7992 @type AutomaticTypes: list of L{ColorspaceType}
7993 @type Raw: bool
7994 @type Scalar: bool
7995 @rtype: L{ColorspaceConfig}
7996 @raise ValueError: Raised if an invalid number of colorspaces or automatic types is given.
7997 """
7998 pass
7999
8003
8006 """Base class for a slider widget.
8007
8008 Provides the base functionality for a custom slider widget in Mari.
8009
8010 B{Example Code}
8011
8012 >>> # This example creates a new FloatSlider object, add it to a QWidget and show it
8013 >>> import mari
8014 >>> import PySide
8015 >>> float_slider = mari.FloatSlider()
8016 >>> container = PySide.QtGui.QWidget()
8017 >>> container.setLayout(PySide.QtGui.QHBoxLayout())
8018 >>> float_slider.addToLayout(container.layout())
8019 >>> container.show()
8020 """
8021
8023 """Adds the slider to the given layout.
8024
8025 @type Layout: QLayout
8026 @param Layout: The layout to add the slider widget to
8027 @rtype: None
8028 @raise ValueError: Raised if the given layout is null.
8029 """
8030 pass
8031
8033 """Disables or re-enables the emission of signals from the object.
8034
8035 If L{Block} is True, this will block the emission of signals from this object - i.e., emitting a signal will not invoke anything connected to it. If L{Block} is False, any previous blocking will be deactivated.
8036
8037 Signals are always enabled by default.
8038
8039 When using this function, you should store the return value, which is the previous setting for whether signals were blocked. When your processing has finished, you should call this function again with the previous value. This will ensure that signals will not be re-enabled earlier than intended.
8040
8041 @type Block: bool
8042 @param Block: True to block signals, or False to unblock them - but see above for why this should generally be called with a stored value instead of an explicit False
8043 @rtype: bool
8044 @return: The previous value of whether signals were blocked.
8045 """
8046 pass
8047
8049 """Returns whether the slider is enabled.
8050
8051 @rtype: bool
8052 """
8053 pass
8054
8056 """Returns whether or not the slider is logarithmic.
8057
8058 @rtype: bool
8059 @return: Whether or not the slider is logarithmic.
8060 @see: L{setLogarithmic()}
8061 """
8062 pass
8063
8065 """Returns the number of decimal places for the slider.
8066
8067 @rtype: int
8068 @return: The number of decimal places of the slider.
8069 @see: L{setPrecision()}
8070 """
8071 pass
8072
8073 - def range(self, Min, Max):
8074 """Returns the upper and lower limits for the slider.
8075
8076 @type Min: double
8077 @param Min: The lower limit of the slider.
8078 @type Max: double
8079 @param Max: The upper limit of the slider.
8080 @rtype: None
8081 @see: L{setRange()}
8082 """
8083 pass
8084
8086 """Returns the upper limit for the slider.
8087
8088 @rtype: double
8089 @return: The upper limit of the slider.
8090 """
8091 pass
8092
8094 """Returns the lower limit for the slider.
8095
8096 @rtype: double
8097 @return: The lower limit of the slider.
8098 """
8099 pass
8100
8102 """Sets whether the slider is enabled.
8103
8104 @type Enabled: bool
8105 @rtype: None
8106 """
8107 pass
8108
8110 """Sets whether or not the slider is logarithmic.
8111
8112 @type IsLogarithmic: bool
8113 @param IsLogarithmic: Whether or not the slider is logarithmic.
8114 @rtype: None
8115 @see: L{logarithmic()}
8116 """
8117 pass
8118
8120 """Sets the number of decimal places for the slider.
8121
8122 @type NumDecimalPlaces: int
8123 @param NumDecimalPlaces: The number of decimal places of the slider.
8124 @rtype: None
8125 @see: L{precision()}
8126 """
8127 pass
8128
8130 """Sets the upper and lower ranges for the slider.
8131
8132 @type Min: double
8133 @param Min: The lower limit of the slider.
8134 @type Max: double
8135 @param Max: The upper limit of the slider.
8136 @rtype: None
8137 @see: L{range()}
8138 """
8139 pass
8140
8142 """Sets the size of each slider click.
8143
8144 @type StepSize: double
8145 @param StepSize: The step size of the slider.
8146 @rtype: None
8147 @see: L{stepSize()}
8148 """
8149 pass
8150
8152 """Returns the size of each slider click.
8153
8154 @rtype: double
8155 @return: The step size of the slider.
8156 @see: L{setStepSize()}
8157 """
8158 pass
8159
8279
8280 tools = ToolManager()
8284 """An object for creating lighting effects on a 3D mesh.
8285
8286 You can access lights through the L{LightManager} - for example: C{mari.lights.list()}
8287 """
8288
8290 """Returns the ambient color of the light.
8291
8292 @rtype: L{Color}
8293 @return: The ambient color
8294 @see: L{setAmbient()}
8295 """
8296 pass
8297
8299 """Return the constant attenuation value for this light.
8300
8301 @rtype: float
8302 @return: The constant attenuation value
8303 @see: L{setConstantAttenuation()}
8304 """
8305 pass
8306
8308 """Returns the diffuse color of the light.
8309
8310 @rtype: L{Color}
8311 @return: The diffuse color
8312 @see: L{setDiffuse()}
8313 """
8314 pass
8315
8317 """Returns the type of object that the light is fixed to.
8318
8319 Lights can be fixed to either the world or the camera. This allows lights to follow the view, ensuring models are illuminated at all times.
8320
8321 @rtype: L{FixedTo}
8322 @return: L{Light.SCENE} if the light is fixed to the scene, or L{Light.CAMERA} if fixed to the camera.
8323 @see: L{setFixedTo()}
8324 """
8325 pass
8326
8328 """Return the linear attenuation value for this light.
8329
8330 @rtype: float
8331 @return: The linear attenuation value
8332 @see: L{setLinearAttenuation()}
8333 """
8334 pass
8335
8337 """Returns the position of the light in the scene.
8338
8339 @type Frame: int
8340 @param Frame: The frame to retrieve the position for. Use 0 (the default) when there is no animation.
8341 @rtype: L{VectorN}
8342 @return: The position of the light in the scene
8343 @see: L{setPosition()}
8344 """
8345 pass
8346
8348 """Return the quadratic attenuation value for this light.
8349
8350 @rtype: float
8351 @return: The quadratic attenuation value
8352 @see: L{setQuadraticAttenuation()}
8353 """
8354 pass
8355
8357 """Return whether to render shadows.
8358
8359 @rtype: bool
8360 @return: Whether to render shadows
8361 @see: L{setRenderShadows()}
8362 """
8363 pass
8364
8366 """Sets the specular L{Color} of the light.
8367
8368 @type NewColor: L{Color}
8369 @param NewColor: The new specular color for the light
8370 @rtype: None
8371 @see: L{ambient()}
8372 """
8373 pass
8374
8376 """Set the constant attenuation for the light.
8377
8378 @type Atten: float
8379 @param Atten: The new constant attenuation for the light
8380 @rtype: None
8381 @see: L{constantAttenuation()}
8382 """
8383 pass
8384
8386 """Set the diffuse color of the light.
8387
8388 @type NewColor: L{Color}
8389 @param NewColor: The new diffuse color for the light
8390 @rtype: None
8391 @see: L{diffuse()}
8392 """
8393 pass
8394
8396 """Sets the type of object that the light should be fixed to.
8397
8398 @type TargetType: L{FixedTo}
8399 @param TargetType: L{Light.SCENE} if the light is to be fixed to the scene, or L{Light.CAMERA} if fixed to the camera.
8400 @rtype: None
8401 @see: L{fixedTo()}
8402 """
8403 pass
8404
8406 """Set the linear attenuation for the light.
8407
8408 @type Atten: float
8409 @param Atten: The new linear attenuation for the light
8410 @rtype: None
8411 @see: L{linearAttenuation()}
8412 """
8413 pass
8414
8416 """Sets the position of the light in the scene.
8417
8418 Positions can only be set on the default frame (0) at present.
8419
8420 @type pTranslation: L{VectorN}
8421 @param pTranslation: The new position of the light
8422 @rtype: None
8423 @see: L{position()}
8424 """
8425 pass
8426
8428 """Set the quadratic attenuation for the light.
8429
8430 @type Atten: float
8431 @param Atten: The new quadratic attenuation for the light
8432 @rtype: None
8433 @see: L{quadraticAttenuation()}
8434 """
8435 pass
8436
8438 """Set whether to render shadows.
8439
8440 @type Render: bool
8441 @param Render: Whether to render shadows
8442 @rtype: None
8443 @see: L{renderShadows()}
8444 """
8445 pass
8446
8448 """Sets the specular L{Color} of the light.
8449
8450 @type NewColor: L{Color}
8451 @param NewColor: The new specular color for the light
8452 @rtype: None
8453 @see: L{specular()}
8454 """
8455 pass
8456
8458 """Set the Spot cutoff component of the light.
8459
8460 @type Cutoff: float
8461 @param Cutoff: The new spot cutoff of the light
8462 @rtype: None
8463 @see: L{spotCutoff()}
8464 """
8465 pass
8466
8468 """Set the spot direction for this light.
8469
8470 @type Direction: L{VectorN}
8471 @param Direction: The new spot direction for this light
8472 @rtype: None
8473 @see: L{spotDirection()}
8474 """
8475 pass
8476
8478 """Set the Spot exponent component of the light.
8479
8480 @type Exponent: float
8481 @param Exponent: The new spot exponent of the light
8482 @rtype: None
8483 @see: L{spotExponent()}
8484 """
8485 pass
8486
8488 """Returns the specular color of the light.
8489
8490 @rtype: L{Color}
8491 @return: The specular color
8492 @see: L{setSpecular()}
8493 """
8494 pass
8495
8497 """Return the spot cutoff for the light.
8498
8499 @rtype: float
8500 @return: The spot cutoff value
8501 @see: L{setSpotCutoff()}
8502 """
8503 pass
8504
8506 """Return the spot direction for this light.
8507
8508 @rtype: L{VectorN}
8509 @return: The spot direction value for this light
8510 @see: L{setSpotDirection()}
8511 """
8512 pass
8513
8515 """Return the spot exponent of this light.
8516
8517 @rtype: float
8518 @return: The spot exponent of the light
8519 @see: L{setSpotExponent()}
8520 """
8521 pass
8522
8525 """An action that can be assigned to a menu and/or shortcut.
8526
8527 Built-in actions will generally be of this type when retrieved from the L{ActionManager}. Custom user actions, which run Python scripts, will be L{ScriptAction} objects.
8528
8529 B{Example Code}
8530
8531 >>> # This example creates an action to print "Hello World" to the log and executes the action
8532 >>> import mari
8533 >>> action = mari.actions.create("MyCustomActions/Print Hello","mari.app.log('Hello World')")
8534 >>> action.trigger()
8535
8536 >>> import mari
8537 >>> # This example finds the action and executes it
8538 >>> action = mari.actions.find("Mari/Scripts/MyCustomActions/Print Hello")
8539 >>> action.trigger()
8540
8541 @group Signals: triggered
8542 """
8543
8545 """Adds the action to an action set.
8546
8547 Adding an action to a set that is disabled will disable the action.
8548
8549 @type SetName: str
8550 @param SetName: The name of the set to add the action to. If the set does not exist, it will be created
8551 @rtype: None
8552 @raise ValueError: Raised if the set name was invalid.
8553 @see: L{removeFromSet()}
8554 """
8555 pass
8556
8558 """Returns the path to the icon used for the action.
8559
8560 @rtype: str
8561 @return: The path to the icon. If no icon is used, this will be blank.
8562 @raise TypeError: Raised if the action is of a built-in type that does not support icon path retrieval.
8563 @see: L{setIconPath()}
8564 """
8565 pass
8566
8568 """Indicates whether the given action has a check box that can be turned on and off.
8569
8570 @rtype: bool
8571 @return: True if the action has a check box, or False if not.
8572 @see: L{setCheckable()}
8573 """
8574 pass
8575
8577 """Returns True if the action is checked, False otherwise.
8578
8579 @rtype: bool
8580 @return: Whether the action is checked or not
8581 @see: L{setChecked()}
8582 """
8583 pass
8584
8586 """Indicates whether the action is enabled.
8587
8588 @rtype: bool
8589 @return: True if the action is enabled, or False otherwise.
8590 @see: L{setEnabled()}
8591 """
8592 pass
8593
8595 """Returns the name of the action.
8596
8597 This is the same as L{text()}.
8598
8599 @rtype: str
8600 @return: The name of the action
8601 @see: L{text()}, L{setText()}
8602 """
8603 pass
8604
8606 """Returns the path that this action is registered in.
8607
8608 If an internal action is registered in multiple paths, this will return the first one.
8609
8610 @rtype: str
8611 @return: The path that this action is registered in, such as "Mari/Scripts/Custom Action". For a description of action paths, see L{ActionManager.create()}
8612 """
8613 pass
8614
8616 """Removes the action from an action set.
8617
8618 @type SetName: str
8619 @param SetName: The set to remove the action from
8620 @rtype: None
8621 @raise ValueError: Raised if the set name was invalid.
8622 @see: L{addToSet()}
8623 """
8624 pass
8625
8627 """Removes any current shortcut for the action.
8628
8629 If the action specified does not have a shortcut, this function will complete successfully without raising an exception.
8630
8631 @rtype: None
8632 @see: L{shortcut()}, L{setShortcut()}
8633 """
8634 pass
8635
8637 """Sets the action as being checkable i.e.
8638
8639 one that has an on/off state.
8640
8641 @type Checkable: bool
8642 @param Checkable: Whether the action is checkable or not
8643 @rtype: None
8644 @see: L{isCheckable()}
8645 """
8646 pass
8647
8649 """Sets the action as being checked.
8650
8651 @type Checked: bool
8652 @param Checked: Whether the action is checked or not
8653 @rtype: None
8654 @see: L{isChecked()}
8655 """
8656 pass
8657
8659 """Enables or disables this action.
8660
8661 @type Enabled: bool
8662 @param Enabled: True to enable the action, or False to disable it.
8663 @rtype: None
8664 @see: L{isEnabled()}
8665 """
8666 pass
8667
8669 """Sets the icon to display on menus for the action.
8670
8671 @type IconPath: str
8672 @param IconPath: The path to an icon to load
8673 @rtype: None
8674 @raise IOError: Raised if the icon failed to load.
8675 @raise TypeError: Raised if the action is of a built-in type that does not support icon path retrieval.
8676 @deprecated: This function will be removed in a future version. Please use L{setIconPath()} instead.
8677 """
8678 pass
8679
8681 """Sets the icon to display on menus for the action.
8682
8683 @type IconPath: str
8684 @param IconPath: The path to an icon to load
8685 @rtype: None
8686 @raise IOError: Raised if the icon failed to load.
8687 @raise TypeError: Raised if the action is of a built-in type that does not support icon path retrieval.
8688 @see: L{iconPath()}
8689 """
8690 pass
8691
8693 """Sets the shortcut key for the action.
8694
8695 Shortcuts can be single keys ("F1"), keys with modifiers ("Ctrl+A"), or empty to specify no shortcut.
8696
8697 @type rString: str
8698 @param rString: The new shortcut string for the given action. Pass in an empty string to clear the shortcut
8699 @rtype: None
8700 @raise ValueError: Raised if the shortcut string was invalid.
8701 @see: L{shortcut()}, L{removeShortcut()}
8702 """
8703 pass
8704
8706 """Sets the status tip displayed on all status bars by the action's top-level parent widget.
8707
8708 @type StatusTip: str
8709 @param StatusTip: The status tip for the action
8710 @rtype: None
8711 @see: L{statusTip()}
8712 """
8713 pass
8714
8715 - def setText(self, NewText):
8716 """Sets the text to display for the action.
8717
8718 @type NewText: str
8719 @param NewText: The new text for the action
8720 @rtype: None
8721 @see: L{name()}, L{text()}
8722 """
8723 pass
8724
8734
8736 """Sets the "What's This?" text used to provide a brief description of the action.
8737
8738 @type WhatsThis: str
8739 @param WhatsThis: The "What's This?" text for the action
8740 @rtype: None
8741 @see: L{whatsThis()}
8742 """
8743 pass
8744
8746 """Returns the string representation of the shortcut for the action.
8747
8748 @rtype: str
8749 @return: A string returning the shortcut for the given action, or an empty string if there is no shortcut.
8750 @note: This may not match the value originally set if something else has overridden the shortcut key since then.
8751 @see: L{setShortcut()}, L{removeShortcut()}
8752 """
8753 pass
8754
8756 """Returns the status tip for the action displayed on status bars.
8757
8758 @rtype: str
8759 @return: The status tip for the action
8760 @see: L{setStatusTip()}
8761 """
8762 pass
8763
8765 """Returns the text to display for the action when required.
8766
8767 @rtype: str
8768 @return: The text to display for the action when required
8769 @see: L{name()}, L{setText()}
8770 """
8771 pass
8772
8781
8783 """Executes the script action.
8784
8785 @rtype: None
8786 @see: L{triggered()}
8787 """
8788 pass
8789
8791 """This is emitted when the action is triggered by Python or GUI interaction.
8792
8793 @rtype: None
8794 @see: L{trigger()}
8795 """
8796 pass
8797
8799 """Returns the "What's This?" text used to provide a brief description of the action.
8800
8801 @rtype: str
8802 @return: The "What's This?" text for the action
8803 @see: L{setWhatsThis()}
8804 """
8805 pass
8806
8807
8808 -class History(object):
8809 """Provides access to the Mari editing history, or undo stack.
8810
8811 The history is only available for the currently open project, and will be lost when the project is closed. Operations cannot be performed when there is no project open.
8812 B{Example Code}
8813
8814 >>> # This example calls undo() to undo the last change in the undo history
8815 >>> import mari
8816 >>> mari.history.undo()
8817 True
8818 """
8819
8820 - def clear(self, ShowDialog=True):
8821 """Clears the undo history, without undoing any operations.
8822
8823 This permanently clears the undo history, without undoing any of the operations. Effectively there will be no change to the current state of the project other than that none of the previous operations can be undone (or redone) afterwards.
8824
8825 However, clearing the undo history will remove references to previous data that are no longer needed, and hence free space in memory and on disk when garbage collection is performed.
8826
8827 As undo data will be destroyed, this method optionally displays a confirmation dialog.
8828
8829 This function raises an exception if it is called when the current project requires saving. This is because clearing history on an unsaved project would invalidate any old data from the saved state that has since been changed. If the user then closed the project without saving, some of the data from that saved state might no longer be valid. This could appear as project corruption, so the exception avoids that risk.
8830
8831 @type ShowDialog: bool
8832 @param ShowDialog: If set to True, Mari will display a confirmation dialog
8833 @rtype: None
8834 @raise RuntimeError: Raised if there is no project open, or if the current project requires saving.
8835 @warning: Older versions of Mari did not raise an exception when the function was called on a project that required saving. Please ensure that any relevant scripts are up to date.
8836 """
8837 pass
8838
8839 - def isMacroActive(self):
8840 """Indicates whether history items are currently being grouped into a macro.
8841
8842 This method will return True if L{startMacro()} has been called without a corresponding L{stopMacro()}.
8843
8844 Many internal functions also start and stop macros, and this function will also return True if called while one of those macros is active. This can happen when running custom code in response to a signal, for example.
8845
8846 @rtype: bool
8847 @return: True if history items are being grouped into a macro, or False otherwise
8848 @raise ValueError: Raised if there is no project open.
8849 """
8850 pass
8851
8853 """Redoes the most recently undone action in the history.
8854
8855 @rtype: bool
8856 @return: True if the redo was performed, or False when there are no more items to redo
8857 @raise RuntimeError: Raised if there is no project open.
8858 @see: L{undo()}
8859 """
8860 pass
8861
8862 - def startMacro(self, MacroName):
8863 """Starts grouping history items into a new macro.
8864
8865 Mari allows grouping of history items into macros. A macro is a block of actions that appears as one item in the history and can be done or redone as a single unit. L{startMacro()} I{must} be followed by L{stopMacro()}; if not, the behavior is undefined.
8866
8867 @type MacroName: str
8868 @param MacroName: The name of the new macro block. This name will appear in the history view.
8869 @rtype: None
8870 @raise RuntimeError: Raised if there is no project open.
8871 @raise ValueError: Raised if the macro name is empty.
8872 @see: L{isMacroActive()}
8873 """
8874 pass
8875
8876 - def stopMacro(self):
8877 """Stops the current macro grouping.
8878
8879 This ends the group of history items begun by L{startMacro()}.
8880
8881 @rtype: None
8882 @raise RuntimeError: Raised if there is no project open, or if no macro is currently active.
8883 @see: L{isMacroActive()}
8884 """
8885 pass
8886
8888 """Undoes the last action in the history.
8889
8890 @rtype: bool
8891 @return: True if the undo was performed, or False when there are no more items to undo
8892 @raise RuntimeError: Raised if there is no project open.
8893 @see: L{redo()}
8894 """
8895 pass
8896
8899 """Manages the lights in the scene.
8900
8901 B{Example Code}
8902
8903 >>> # This example shows how to obtain all lights
8904 >>> import mari
8905 >>> lights = mari.lights.list()
8906 """
8907
8909 """Returns the currently selected light.
8910
8911 @rtype: L{Light}
8912 @return: The currently selected light.
8913 """
8914 pass
8915
8917 """Returns a list of all lights in the project.
8918
8919 @rtype: list of L{Light}
8920 @return: All lights in the project.
8921 """
8922 pass
8923
8925 """Returns a list of all selected lights in the project.
8926
8927 @rtype: list of L{Light}
8928 @return: All selected lights in the project.
8929 """
8930 pass
8931
8934 """Provides access to various color-related functionality.
8935
8936 This includes setting and retrieving the foreground and background colors.
8937
8938 B{Example Code}
8939
8940 >>> # This example constructs a Color object and sets the foreground color with it
8941 >>> import mari
8942 >>> foreground_color = mari.Color(1,1,0,1)
8943 >>> mari.colors.setForeground(foreground_color)
8944
8945 >>> # This example obtains the current foreground color
8946 >>> import mari
8947 >>> foreground_color = mari.colors.foreground()
8948 >>> print foreground_color.toString()
8949 (1,1,0,1)
8950
8951 @group Signals: backgroundChanged, foregroundChanged
8952 """
8953
8955 """Returns the current background color.
8956
8957 @rtype: L{Color}
8958 @return: The currently selected background color
8959 @see: L{setBackground()}
8960 """
8961 pass
8962
8964 """This is emitted when the background color is changed.
8965
8966 @rtype: None
8967 """
8968 pass
8969
8971 """Returns the current foreground color.
8972
8973 @rtype: L{Color}
8974 @return: The currently selected foreground color
8975 @see: L{setForeground()}
8976 """
8977 pass
8978
8980 """This is emitted when the foreground color is changed.
8981
8982 @rtype: None
8983 """
8984 pass
8985
8986 - def pick(self, InitialColor):
8987 """Displays the Mari color picking widget, and returns the color picked.
8988
8989 @type InitialColor: L{Color}
8990 @param InitialColor: The initial color to display in the picker widget
8991 @rtype: L{Color}
8992 @raise RuntimeError: Raised if the user cancelled the color selection.
8993 """
8994 pass
8995
8997 """Sets a new background color.
8998
8999 @type NewColor: L{Color}
9000 @param NewColor: The new background color
9001 @rtype: None
9002 @see: L{background()}
9003 """
9004 pass
9005
9007 """Sets a new foreground color.
9008
9009 @type NewColor: L{Color}
9010 @param NewColor: The new foreground color
9011 @rtype: None
9012 @see: L{foreground()}
9013 """
9014 pass
9015
9018 """This manages the available shelves, or sets of item bookmarks.
9019
9020 B{Example Code}
9021
9022 >>> # This example shows how to obtain the "Personal" shelf
9023 >>> import mari
9024 >>> personal_shelf = mari.shelves.find("Personal")
9025 >>> print personal_shelf.className()
9026 Shelf
9027 """
9028
9029 - def find(self, Name):
9030 """Returns the shelf with the given name.
9031
9032 @type Name: str
9033 @param Name: The name of the shelf to look for
9034 @rtype: L{Shelf}
9035 @return: The shelf with the given name if found, or None otherwise
9036 """
9037 pass
9038
9040 """Returns a list of all the available shelves.
9041
9042 @rtype: list of L{Shelf}
9043 @return: A list of all of the available shelves
9044 """
9045 pass
9046
9048 """Returns a string list of the names of all of the available shelves.
9049
9050 @rtype: list of str
9051 @return: A string list of the names of all of the available shelves
9052 """
9053 pass
9054
9055 shelves = ShelfManager()
9059 """An integer slider widget.
9060
9061 Provides a custom integer slider widget.
9062
9063 B{Example Code}
9064
9065 >>> # This example creates a new FloatSlider object, add it to a QWidget and show it
9066 >>> import mari
9067 >>> import PySide
9068 >>> int_slider = mari.IntSlider()
9069 >>> container = PySide.QtGui.QWidget()
9070 >>> container.setLayout(PySide.QtGui.QHBoxLayout())
9071 >>> int_slider.addToLayout(container.layout())
9072 >>> container.show()
9073
9074 @group Signals: valueChanged
9075 """
9076
9078 """Sets the value of the slider.
9079
9080 @type Value: int
9081 @param Value: The value to set the slider to.
9082 @rtype: None
9083 @see: L{value()}
9084 """
9085 pass
9086
9088 """Returns the value of the slider.
9089
9090 @rtype: int
9091 @return: The value of the slider.
9092 @see: L{setValue()}
9093 """
9094 pass
9095
9097 """This is emitted when the value of the slider changes.
9098
9099 @type Value: int
9100 @param Value: The value the slider has changed to.
9101 @rtype: None
9102 """
9103 pass
9104
9106 """Sets to the int slider specified by the given components.
9107
9108 @type Parent: QWidget
9109 @rtype: L{IntSlider}
9110 """
9111 pass
9112
9115 """A dockable widget class.
9116
9117 Palettes are dockable widgets that can be moved around and configured by the user.
9118
9119 You can access palettes through the L{PaletteManager} - for example: C{mari.palettes.list()}
9120
9121 B{Example Code}
9122
9123 >>> # This example shows how to create a palette with a label
9124 >>> import mari, PySide
9125 >>> label = PySide.QtGui.QLabel("Hello World")
9126 >>> new_palette = mari.palettes.create("Hello World Palette","",label)
9127 >>> mari.palettes.remove(new_palette.name());
9128 """
9129
9131 """Brings the palette to the front of the other windows.
9132
9133 This can be used to bring the palette to the front of the group of palettes it is docked with, or to raise a floating palette above anything else it might currently be behind.
9134
9135 @rtype: None
9136 @see: L{showInFront()}
9137 """
9138 pass
9139
9141 """Disables interaction with the palette.
9142
9143 @rtype: None
9144 @see: L{setEnabled()}, L{enable()}
9145 """
9146 pass
9147
9149 """Enables interaction with the palette.
9150
9151 @rtype: None
9152 @see: L{disable()}, L{setEnabled()}
9153 """
9154 pass
9155
9157 """Returns the full name displayed on the palette title.
9158
9159 This is the same as L{name()}.
9160
9161 @rtype: str
9162 @return: The full name displayed on the palette title.
9163 @see: L{setFullName()}
9164 """
9165 pass
9166
9168 """Hides the palette.
9169
9170 @rtype: None
9171 @see: L{setVisibility()}, L{show()}
9172 """
9173 pass
9174
9176 """Returns the full name displayed on the palette title.
9177
9178 This is the same as L{fullName()}.
9179
9180 @rtype: str
9181 @return: The full name displayed on the palette title.
9182 """
9183 pass
9184
9186 """Sets the body widget of the palette.
9187
9188 This is the widget that holds everything to display for the palette.
9189
9190 @type pBody: QWidget
9191 @param pBody: The widget that holds everything to display for the palette
9192 @rtype: None
9193 """
9194 pass
9195
9197 """Sets the context sensitive key, that is appended to the online documentation when the CSH button on this palette is triggered.
9198
9199 @type Key: str
9200 @param Key: The context sensitive key.
9201 @rtype: None
9202 """
9203 pass
9204
9206 """Enables or disables interaction with the palette.
9207
9208 @type Enabled: bool
9209 @rtype: None
9210 @see: L{disable()}, L{enable()}
9211 """
9212 pass
9213
9215 """Sets the full name to be displayed on the palette title.
9216
9217 @type rName: str
9218 @param rName: The full name to be displayed on the palette title.
9219 @rtype: None
9220 @see: L{fullName()}
9221 """
9222 pass
9223
9225 """Sets the short name to be displayed on the palettes tab.
9226
9227 @type rName: str
9228 @param rName: The short name to be displayed on the palettes tab.
9229 @rtype: None
9230 @see: L{shortName()}
9231 """
9232 pass
9233
9235 """Sets the visibility state of the palette.
9236
9237 @type Visible: bool
9238 @param Visible: True to show, or False to hide.
9239 @rtype: None
9240 @see: L{show()}, L{hide()}
9241 """
9242 pass
9243
9245 """Returns the short name displayed on the palettes tab.
9246
9247 @rtype: str
9248 @return: The short name displayed on the palettes tab.
9249 @see: L{setShortName()}
9250 """
9251 pass
9252
9254 """Shows the palette.
9255
9256 @rtype: None
9257 @see: L{setVisibility()}, L{hide()}
9258 """
9259 pass
9260
9262 """Shows the palette and brings it to the front of other windows.
9263
9264 This is the equivalent of calling L{show()} and then L{bringToFront()}.
9265
9266 @rtype: None
9267 """
9268 pass
9269
9270 - def __init__(self, rName, pBodyWidget=None):
9271 """Creates a new palette with the given name.
9272
9273 @type rName: str
9274 @param rName: The name of the new palette to create. This must be non-empty and unique, or the function will raise an exception. The name will be initially used as both the full and short name for the palette.
9275 @type pBodyWidget: QWidget
9276 @param pBodyWidget: The widget to set as the palette's body - i.e. the one that holds everything to display for the palette.
9277 @rtype: L{Palette}
9278 @raise ValueError: Throws a value error if the name is empty, of if a palette with the given name already exists.
9279 """
9280 pass
9281
9284 """Represents node speciailizing in baking result of intermediate point in the L{NodeGraph}.
9285
9286 B{Example Code}
9287
9288 This example shows how to create a L{BakePointNode}
9289
9290 >>> import mari
9291 >>> nodeGraph = mari.geo.current().nodeGraph()
9292 >>> paintNode = nodeGraph.createBakePointNode( 1024, 1024, 8, mari.Color(1.0,1.0,0.0,1.0) )
9293
9294 This example obtains a L{BakePointNode} from the node graph of the current geo entity and
9295
9296 >>> for node in nodeGraph.nodeList():
9297 ... if node.isBakePointNode():
9298 ... mari.app.log( "Found BakePointNode : "+node.nodeName() )
9299 """
9300
9302 """Bakes the result at this node into the image set.
9303
9304 Bakes the result at this node into the image set.
9305
9306 The result of baking can be obtained by L{bakedResult()}.
9307
9308 @rtype: None
9309 """
9310 pass
9311
9313 """Returns the image set of baked result.
9314
9315 @rtype: L{ImageSet}
9316 @return: The image set this node holds as baked result.
9317 @raise RuntimeError: Raised if the image set cannot be found.
9318 """
9319 pass
9320
9322 """Deletes the baked result.
9323
9324 @rtype: None
9325 """
9326 pass
9327
9329 """Returns the depth of this BakePoint node.
9330
9331 @rtype: L{Image.Depth}
9332 @return: The depth of this BakePoint node
9333 """
9334 pass
9335
9337 """Returns the export path, where the baked textures will be exported to.
9338
9339 @rtype: str
9340 @return: The export path, where the baked textures will be exported to
9341 @see: L{setExportPath()}
9342 """
9343 pass
9344
9346 """Returns whether there is baked result.
9347
9348 @rtype: bool
9349 """
9350 pass
9351
9353 """Returns whether this node is a L{BakePointNode}.
9354
9355 @rtype: bool
9356 @return: Whether this node is a L{BakePointNode}
9357 """
9358 pass
9359
9361 """Returns whether the baked result is up to date.
9362
9363 Returns whether the baked result is up to date.
9364
9365 If there is no baked result yet, this will return False.
9366
9367 @rtype: bool
9368 """
9369 pass
9370
9372 """Sets the export path, where the baked textures will be exported to.
9373
9374 @type Path: str
9375 @param Path: The export path, where the baked textures will be exported to
9376 @rtype: None
9377 @see: L{exportPath()}
9378 """
9379 pass
9380
9382 """Sets whether this node should use the baked result if available.
9383
9384 @type UseBaked: bool
9385 @rtype: None
9386 @see: L{useBaked()}
9387 """
9388 pass
9389
9391 """Returns whether this node should use the baked result or not.
9392
9393 @rtype: bool
9394 @see: L{setUseBaked()}
9395 """
9396 pass
9397
9400 """Handles opening, closing, and general manipulation of projects.
9401
9402 Information about the available projects can be obtained using the L{list()} method. This returns L{ProjectInfo} objects to describe the projects can be opened. These projects will only be available as L{Project} objects after opening.
9403
9404 B{Example Code}
9405
9406 >>> # This example shows how to obtain the Project object representing the current project
9407 >>> import mari
9408 >>> project = mari.projects.current()
9409
9410 @cvar EXACT: Only projects from exactly this version of Mari can be loaded.
9411 @cvar OLDER_OR_EXACT: Projects from older versions or the current version can be loaded.
9412 @cvar ANY: Projects from any version of Mari can be loaded (be careful with this).
9413 @cvar ASK: Ask the user with message boxes whether they want to load other project versions.
9414 @cvar UV_OR_PTEX: Use UVs if they exist, or L{Ptex} if there are none; this is the default value.
9415 @cvar FORCE_PTEX: Force L{Ptex} mode.
9416 @cvar MERGE_GEOMETRIES: Merge multiple surfaces in the obj file into one Mari geometry in a single object; this is the default value.
9417 @cvar KEEP_SEPARATE: Keep multiple surfaces as separate Mari geometries in a single object (L{Ptex} only).
9418 @cvar PTEX_UNIFORM_SIZE: All faces all have a uniform texture size. The size is specified in the value of the PtexFaceSize meta option.
9419 @cvar PTEX_WORLD_SPACE_DENSITY_SIZE: Faces have texture sizes proportional to their model sizes. The texel density is specified in the value of the PtexFaceSize meta option.
9420 @cvar PTEXFORMAT_BYTE: Unsigned byte image data.
9421 @cvar PTEXFORMAT_HALF: Half float image data.
9422 @cvar PTEXFORMAT_FLOAT: Float image data.
9423 @group Signals: aboutToArchive, aboutToClose, aboutToCloseProject, aboutToExport, aboutToOpen, aboutToOpenProject, aboutToSave, aboutToSaveNew, aboutToSaveNewProject, aboutToSaveProject, archived, closed, created, exported, exportedSummary, opened, openedProject, projectClosed, projectCreated, projectSaved, saved
9424 """
9425
9427 """Determines the versions of project that can be loaded.
9428
9429 Note that this version checking depends only on major and minor version numbers, and not 'v'-releases. For example, 1.3v1 and 1.3v2 are both considered to be simply 1.3.
9430
9431 @cvar EXACT: Only projects from exactly this version of Mari can be loaded.
9432 @cvar OLDER_OR_EXACT: Projects from older versions or the current version can be loaded.
9433 @cvar ANY: Projects from any version of Mari can be loaded (be careful with this).
9434 @cvar ASK: Ask the user with message boxes whether they want to load other project versions.
9435 @note: These values are exposed in the parent class, but are also documented here for convenience.
9436 """
9437 EXACT = 0
9438 OLDER_OR_EXACT = 1
9439 ANY = 2
9440 ASK = 3
9441
9442 EXACT = 0
9443 OLDER_OR_EXACT = 1
9444 ANY = 2
9445 ASK = 3
9446
9448 """Mesh options for choosing the texturing method in projects.
9449 @cvar UV_OR_PTEX: Use UVs if they exist, or L{Ptex} if there are none; this is the default value.
9450 @cvar FORCE_PTEX: Force L{Ptex} mode.
9451 @note: These values are exposed in the parent class, but are also documented here for convenience.
9452 """
9453 UV_OR_PTEX = 0
9454 FORCE_PTEX = 1
9455
9456 UV_OR_PTEX = 0
9457 FORCE_PTEX = 1
9458
9460 """Multiple geometry options for importing obj files.
9461 @cvar MERGE_GEOMETRIES: Merge multiple surfaces in the obj file into one Mari geometry in a single object; this is the default value.
9462 @cvar KEEP_SEPARATE: Keep multiple surfaces as separate Mari geometries in a single object (L{Ptex} only).
9463 @note: These values are exposed in the parent class, but are also documented here for convenience.
9464 """
9465 MERGE_GEOMETRIES = 0
9466 KEEP_SEPARATE = 1
9467
9468 MERGE_GEOMETRIES = 0
9469 KEEP_SEPARATE = 1
9470
9472 """L{Ptex} schemes for setting face sizes.
9473 @cvar PTEX_UNIFORM_SIZE: All faces all have a uniform texture size. The size is specified in the value of the PtexFaceSize meta option.
9474 @cvar PTEX_WORLD_SPACE_DENSITY_SIZE: Faces have texture sizes proportional to their model sizes. The texel density is specified in the value of the PtexFaceSize meta option.
9475 @note: These values are exposed in the parent class, but are also documented here for convenience.
9476 """
9477 PTEX_UNIFORM_SIZE = 0
9478 PTEX_WORLD_SPACE_DENSITY_SIZE = 1
9479
9480 PTEX_UNIFORM_SIZE = 0
9481 PTEX_WORLD_SPACE_DENSITY_SIZE = 1
9482
9493
9494 PTEXFORMAT_BYTE = 0
9495 PTEXFORMAT_HALF = 1
9496 PTEXFORMAT_FLOAT = 2
9497
9499 """This is emitted just before a project is archived.
9500
9501 @type UUID: str
9502 @param UUID: The unique identifier of the project
9503 @rtype: None
9504 @see: L{archived()}
9505 """
9506 pass
9507
9509 """This is emitted just before a project is closed.
9510
9511 @type CurrentProject: L{Project}
9512 @param CurrentProject: The project Mari is about to close
9513 @rtype: None
9514 @see: L{closed()}
9515 """
9516 pass
9517
9519 """(Deprecated) This is emitted just before a project is closed.
9520
9521 @type CurrentProject: L{Project}
9522 @param CurrentProject: The project Mari is about to close
9523 @rtype: None
9524 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{aboutToClose()} instead.
9525 """
9526 pass
9527
9529 """This is emitted just before an export operation.
9530
9531 This signal is emitted before an export operation, and allows message hooks to be attached to Images, for example.
9532
9533 @rtype: None
9534 """
9535 pass
9536
9538 """This is emitted just before a new project is opened.
9539
9540 @type UUID: str
9541 @param UUID: The unique identifier of the project Mari is about to open
9542 @rtype: None
9543 @see: L{opened()}
9544 """
9545 pass
9546
9548 """(Deprecated) This is emitted just before a new project is opened.
9549
9550 @type UUID: str
9551 @param UUID: The unique identifier of the project Mari is about to open
9552 @rtype: None
9553 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{aboutToOpen()} instead.
9554 """
9555 pass
9556
9558 """This is emitted just before a project is saved.
9559
9560 @type ProjectToSave: L{Project}
9561 @param ProjectToSave: The project about to be saved
9562 @rtype: None
9563 @see: L{saved()}
9564 """
9565 pass
9566
9568 """This is emitted when a new project has been created, and is about to be saved.
9569
9570 This can be used to apply modifications to a project before its initial save, for example.
9571
9572 @type NewProject: L{Project}
9573 @param NewProject: The newly-created project
9574 @rtype: None
9575 @see: L{created()}
9576 """
9577 pass
9578
9580 """(Deprecated) This is emitted when a new project has been created, and is about to be saved.
9581
9582 This can be used to apply modifications to a project before its initial save, for example.
9583
9584 @type NewProject: L{Project}
9585 @param NewProject: The newly-created project
9586 @rtype: None
9587 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{aboutToSaveNew()} instead.
9588 """
9589 pass
9590
9592 """(Deprecated) This is emitted just before a project is saved.
9593
9594 @type ProjectToSave: L{Project}
9595 @param ProjectToSave: The project about to be saved
9596 @rtype: None
9597 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{aboutToSave()} instead.
9598 """
9599 pass
9600
9601 - def archive(self, rUUIDOrName, rTargetFileName):
9602 """Archives the project with the given UUID or name into a .mra file.
9603
9604 @type rUUIDOrName: str
9605 @param rUUIDOrName: The UUID or name of the project to archive. This is checked in the same way as in L{open()}.
9606 @type rTargetFileName: str
9607 @param rTargetFileName: The file name of the archive to create.
9608 @rtype: None
9609 @raise RuntimeError: Raised if the user cancelled the operation.
9610 @raise ValueError: Raised if no project with the given UUID or name could be found.
9611 @raise RuntimeError: Raised if the project could not be archived because it was open.
9612 @raise IOError: Raised if an I/O error occurred during the archiving process.
9613 """
9614 pass
9615
9617 """This is emitted after a project is successfully archived.
9618
9619 @type UUID: str
9620 @param UUID: The unique identifier of the project
9621 @rtype: None
9622 @see: L{aboutToArchive()}
9623 """
9624 pass
9625
9627 """Returns the path to the Mari cache directory, where the projects are stored.
9628
9629 @rtype: str
9630 @return: The absolute path to the cache
9631 """
9632 pass
9633
9634 - def close(self, ConfirmIfModified=True):
9635 """Closes the project.
9636
9637 @type ConfirmIfModified: bool
9638 @param ConfirmIfModified: Set to False to suppress the confirmation dialog that normally appears if the project has been modified.
9639 @rtype: None
9640 """
9641 pass
9642
9644 """This is emitted after a project is closed.
9645
9646 @rtype: None
9647 @see: L{aboutToClose()}
9648 """
9649 pass
9650
9651 - def copy(self, rUUIDOrName):
9652 """Makes a duplicate of the project with the given UUID or name.
9653
9654 This is the same as L{duplicate()}.
9655
9656 @type rUUIDOrName: str
9657 @param rUUIDOrName: The UUID or name of the project to archive. This is checked in the same way as in L{open()}.
9658 @rtype: None
9659 @raise RuntimeError: Raised if the user cancelled the operation.
9660 @raise ValueError: Raised if no project with the given UUID or name could be found.
9661 @raise RuntimeError: Raised if the project could not be archived because it was open or in use.
9662 @raise IOError: Raised if an I/O error occurred during the duplication process.
9663 @see: L{duplicate}
9664 """
9665 pass
9666
9667 - def create(self, Name, MeshPaths, ChannelsToCreate, ChannelsToImport=[], ProjectMetaOptions=None, ObjectsToLoad=None, ColorspaceSettings=None):
9668 """Creates and opens a new project with the parameters supplied.
9669
9670 Many parameters of the channels that are imported are ignored, such as the size and bit depth, which are read from the file.
9671
9672 At least one channel must be created or imported. If not, an exception will be raised.
9673
9674 Projects currently cannot be created while another project is open.
9675
9676 Options controlling the geometry load can be passed to the function in the dictionary parameter L{ProjectMetaOptions}. The dictionary keys must be strings, and the values can be any simple type (i.e., no lists or other containers). The geometry loader plug-in that interprets the mesh to be loaded will receive the options passed in here that it recognises, and the others will be ignored.
9677
9678 When used in combination with the C API, this allows users to pass in parameters with specified names to a custom geometry loader. See the C API documentation for further details.
9679
9680 For the built-in geometry types, the meta keys currently supported are:
9681 - "MappingScheme" - geometry mapping scheme (type L{MeshOptions}).
9682 - "MultipleGeometries" - how to handle multiple geometries in a single object (type L{MultipleGeometryOptions}).
9683 - "PtexFaceSizeScheme" - L{Ptex} specific: scheme to use for face texture size calculations (type L{PtexFaceSizeScheme}).
9684 - "PtexFaceSize" - L{Ptex} specific: size to use with the scheme above (type int).
9685 - "PtexImageFormat" - L{Ptex} specific: image data format (type L{PtexFormat}).
9686 - "PtexFaceColor" - L{Ptex} specific: color to clear faces to (type L{Color}).
9687 - "PtexImportFilename" - L{Ptex} specific: import an existing L{Ptex} file onto the .obj geoemtry (type string).
9688 - "PtexShowCreationDialog" - L{Ptex} specific: show the L{Ptex} creation dialog after mesh loading (type Bool; default is False from Python).
9689 - "EachMeshCreatesObject" - each mesh can either create an Object or each be a geometry within a single Object. This is currently L{Ptex} specific. (type Bool; default is True).
9690 - "MergeType" - merging of geometries can be either single-mesh or just-merge-nodes (L{GeoManager.MergeType}).
9691 - "MergeSelectionGroupWithSameNameType" - merging of face selection groups that have the same name (L{GeoManager.MergeSelectionGroupWithSameNameType}) - default is L{GeoManager.MERGESELECTIONGROUP_DO_NOT_MERGE}
9692 - "CreateSelectionSets" - specify whether to create selection sets from face groups (L{GeoManager.CreateSelectionSetOptions}) - default value is L{GeoManager.SELECTION_GROUPS_CREATE_FROM_FACE_GROUPS}
9693 - "FrameOffset" - specify the start frame in Mari's timeline to import the geometry (default value is zero).
9694 Here is an example of creating a L{Ptex} project that does not show the L{Ptex} creation dialog after mesh loading:
9695
9696 >>> import mari, os
9697 >>> EmptyChannels = []
9698 >>> project_meta_options = dict()
9699 >>> project_meta_options["MappingScheme"] = mari.projects.FORCE_PTEX
9700 >>> project_meta_options["MultipleGeometries"] = mari.projects.MERGE_GEOMETRIES
9701 >>> project_meta_options["PtexFaceSizeScheme"] = mari.projects.PTEX_WORLD_SPACE_DENSITY_SIZE
9702 >>> project_meta_options["PtexFaceSize"] = 16
9703 >>> project_meta_options["PtexImageFormat"] = mari.projects.PTEXFORMAT_HALF
9704 >>> project_meta_options["PtexFaceColor"] = mari.Color(1, 0.25, 1, 1)
9705 >>> project_meta_options["MergeType"] = mari.geo.MERGETYPE_SINGLE_MESH
9706 >>> project_meta_options["CreateSelectionSets"] = mari.geo.SELECTION_GROUPS_CREATE_FROM_FACE_GROUPS
9707 >>> obj_file = os.path.join(mari.resources.path(mari.resources.EXAMPLES),"Objects","cube.obj")
9708 >>> try:
9709 ... mari.projects.create("ptex_example", obj_file, EmptyChannels, EmptyChannels, project_meta_options)
9710 ... except:
9711 ... pass
9712
9713 Here is an example of creating a L{Ptex} project from a number of .ptx files, treating each as a geometry within a single Object:
9714
9715 >>> import mari
9716 >>> ptxFiles = [ "body.ptx", "head.ptx", "larm.ptx", "rarm.ptx" ]
9717 >>> EmptyChannels = []
9718 >>> project_meta_options = dict()
9719 >>> project_meta_options["EachMeshCreatesObject"] = False
9720 >>> try:
9721 ... mari.projects.create("ptexoneobjmanygeos", ptxFiles, EmptyChannels, EmptyChannels, project_meta_options)
9722 ... except:
9723 ... pass
9724
9725 Here is an example of creating a project with frames 1 to 10 of an animated geometry, starting at frame 1001 on the timeline:
9726
9727 >>> import mari
9728 >>> EmptyChannels = []
9729 >>> project_meta_options = dict()
9730 >>> project_meta_options["StartFrame"] = 1
9731 >>> project_meta_options["EndFrame"] = 10
9732 >>> project_meta_options["FrameOffset"] = 1000
9733 >>> try:
9734 ... mari.projects.create("test", "/tmp/animatedGeo.abc", EmptyChannels, EmptyChannels, project_meta_options)
9735 ... except:
9736 ... pass
9737
9738 Creating an alembic project is slightly different, in the sense that you can additionally pass in a list of items/nodes/objects to load from the file. The latter is a list of dictionary items, each dictionary having the name of the object to load as key and flags to specify whether children of the object should be selected as well and whether the children objects should be merged or not (using the enum type GeometryImportFlags); the latter has all of its children and merged by default.
9739
9740 Here is an example of creating a project from an alembic file, with everything merged (by default)
9741
9742 >>> import mari
9743 >>> EmptyChannels = []
9744 >>> project_meta_options = dict()
9745 >>> mari.projects.create("test", "/tmp/animatedGeo.abc", EmptyChannels, EmptyChannels, project_meta_options)
9746
9747 Here is an example of creating a project from an alembic file, with root object(and its children) un-merged
9748
9749 >>> import mari
9750 >>> EmptyChannels = []
9751 >>> project_meta_options = dict()
9752 >>> mari.projects.create("test", "/tmp/animatedGeo.abc", EmptyChannels, EmptyChannels, project_meta_options, [{"/":mari.geo.GEOMETRY_IMPORT_DONT_MERGE_CHILDREN}, ])
9753
9754 Here is an example of creating a project from an alembic file, with a child object (and its children) selected and merged. Please note that passing None as value to the dictionary of the object to load will set its value to defaults, which is select and merge of of its children objects.
9755
9756 >>> import mari
9757 >>> project_meta_options = dict()
9758 >>> mari.projects.create("test", "/tmp/village.abc", [], [], project_meta_options, [{"/Person/Head":None}, ])
9759
9760 Merging of objects can be of two types, namely SINGLE_MESH or JUST_MERGE_NODES. While both of the latters combine multiple geometries into one GeoEnity, the former (the default one as well) goes an extra step further to combine the various geometries into one single geometry inside that L{GeoEntity}; this can lead to more efficient patch layout in the case of PTex. The merge type can be passed in as part of the project_meta_options, as follows:
9761
9762 >>> import mari
9763 >>> project_meta_options = dict()
9764 >>> project_meta_options["MergeType"] = mari.geo.MERGETYPE_JUST_MERGE_NODES
9765 >>> mari.projects.create("test", "/tmp/animatedGeo.abc", [], [], project_meta_options)
9766
9767 @type Name: str
9768 @param Name: The name of the project to create.
9769 @type MeshPaths: variant
9770 @param MeshPaths: A single path or list of paths to the object file(s) that the project should load.
9771 @type ChannelsToCreate: list of L{ChannelInfo}
9772 @param ChannelsToCreate: A list of L{ChannelInfo} objects that contain information about the channels to create - such as their size, color depth, and other properties. Generally the channels in this list will not also be imported.
9773 @type ChannelsToImport: list of L{ChannelInfo}
9774 @param ChannelsToImport: A list of L{ChannelInfo} objects that specify information on the channels that should be imported. These should include valid paths and file template so the textures can be loaded correctly. Imported channels do not need to be included in the rChannelsToCreate list.
9775 @type ProjectMetaOptions: variant
9776 @param ProjectMetaOptions: A dictionary of project creation meta options (see above).
9777 @type ObjectsToLoad: variant
9778 @param ObjectsToLoad: This is a list of objects to load from the file. Each item of the list is a dictionary that contains the name of the objects to load and various geometry import flags to specify whether the children of the current object are to be selected and whether they are to be merged as well.
9779 @type ColorspaceSettings: L{ColorspaceDefaults}
9780 @param ColorspaceSettings: The global colorspace settings of the project.
9781 @rtype: None
9782 @raise ValueError: Raised if no mesh paths were supplied.
9783 @raise ValueError: Raised if invalid colorspace settings were supplied.
9784 @raise TypeError: Raised if the mesh paths parameter was not a string or list of strings.
9785 @raise RuntimeError: Raised if another project is already open.
9786 @raise RuntimeError: Raised if the mesh types are invalid for project creation.
9787 """
9788 pass
9789
9791 """This is emitted when a new project has been created, after it has been saved.
9792
9793 This can be used to perform responses to the successful save of a new project.
9794
9795 @type NewProject: L{Project}
9796 @param NewProject: The newly-created project
9797 @rtype: None
9798 @see: L{aboutToSaveNew()}
9799 """
9800 pass
9801
9803 """Returns the interface to the current project, or None if nothing is loaded.
9804
9805 @rtype: L{Project}
9806 @return: The currently open project, or None if no project is open
9807 """
9808 pass
9809
9811 """Makes a duplicate of the project with the given UUID or name.
9812
9813 This is the same as L{copy()}.
9814
9815 @type rUUIDOrName: str
9816 @param rUUIDOrName: The UUID or name of the project to archive. This is checked in the same way as in L{open()}.
9817 @rtype: None
9818 @raise RuntimeError: Raised if the user cancelled the operation.
9819 @raise ValueError: Raised if no project with the given UUID or name could be found.
9820 @raise RuntimeError: Raised if the project could not be archived because it was open or in use.
9821 @raise IOError: Raised if an I/O error occurred during the duplication process.
9822 @see: L{copy}
9823 """
9824 pass
9825
9827 """This is emitted just after an export operation.
9828
9829 This signal is emitted after an export operation, and allows for post-processing or cleanup after export.
9830
9831 @rtype: None
9832 """
9833 pass
9834
9836 """This is emitted just after an export operation.
9837
9838 @type Summary: str
9839 @param Summary: A string containing a summary of what has been exported. This signal is emitted just after an export operation, and includes a summary of what has been exported.
9840 @rtype: None
9841 """
9842 pass
9843
9845 """Extracts a .mra project archive into a usable project.
9846
9847 @type rFileName: str
9848 @param rFileName: The file name of the archive to extract
9849 @rtype: L{ProjectInfo}
9850 @return: An object with information about the newly extracted project
9851 @raise RuntimeError: Raised if the user cancelled the operation.
9852 @raise ValueError: Raised if no project with the given UUID or name could be found, or if the supplied file name is invalid.
9853 @raise IOError: Raised if an I/O error occurred during the extraction process.
9854 """
9855 pass
9856
9857 - def find(self, rUUIDOrName):
9858 """Returns information about the project with the given UUID or name, if one exists.
9859
9860 This function first tries to find and open a project with the given string as a UUID, and if that fails, it tries again looking for the string as a project name.
9861
9862 @type rUUIDOrName: str
9863 @param rUUIDOrName: The UUID or name of the project to look for.
9864 @rtype: L{ProjectInfo}
9865 @return: An object describing the project with the given UUID or name if found, or None if not.
9866 @see: L{get()}
9867 """
9868 pass
9869
9870 - def get(self, rUUIDOrName):
9871 """Returns information about the project with the given UUID or name.
9872
9873 This function first tries to find and open a project with the given string as a UUID, and if that fails, it tries again looking for the string as a project name.
9874
9875 @type rUUIDOrName: str
9876 @param rUUIDOrName: The UUID or name of the project to look for.
9877 @rtype: L{ProjectInfo}
9878 @return: An object describing the project with the given UUID or name.
9879 @raise ValueError: Raised if no project matching the given UUID or name was found.
9880 @see: L{find()}
9881 """
9882 pass
9883
9885 """Returns a list of L{ProjectInfo} objects, which contain information about the available projects.
9886
9887 @rtype: list of L{ProjectInfo}
9888 @return: A list of objects describing the available projects
9889 """
9890 pass
9891
9893 """Returns the names of the available projects.
9894
9895 @rtype: list of str
9896 @return: The names of the available projects
9897 """
9898 pass
9899
9901 """Opens the project with the given UUID or name.
9902
9903 This function first tries to find and open a project with the given string as a UUID, and if that fails, it tries again looking for the string as a project name.
9904
9905 If both attempts fail, it raises an exception.
9906
9907 @type rUUIDOrName: str
9908 @param rUUIDOrName: The UUID or name of the project to open.
9909 @type Allowed: L{AllowedVersions}
9910 @param Allowed: Determines the project versions of Mari that can be loaded. The default is to only allow loading projects that were saved in older versions of Mari or the current one.
9911 @rtype: L{Project}
9912 @return: The newly opened project.
9913 @raise ValueError: Raised if no project with the given UUID or name could be found.
9914 @raise IOError: Raised if the project was found, but there was an error opening it - including if the project was from a different version of Mari to those specified as allowed.
9915 @raise RuntimeError: Raised if there was already a project open, since only one can be open at a time.
9916 """
9917 pass
9918
9919 - def opened(self, NewProject, NewlyCreated):
9920 """This is emitted just after a project is opened.
9921
9922 @type NewProject: L{Project}
9923 @param NewProject: The newly-opened project
9924 @type NewlyCreated: bool
9925 @param NewlyCreated: True if the project has just been created, or False otherwise
9926 @rtype: None
9927 @see: L{aboutToOpen()}
9928 """
9929 pass
9930
9932 """(Deprecated) This is emitted just after a project is opened.
9933
9934 @type NewProject: L{Project}
9935 @param NewProject: The newly-opened project
9936 @rtype: None
9937 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{opened()} instead.
9938 """
9939 pass
9940
9942 """(Deprecated) This is emitted after a project is closed.
9943
9944 @rtype: None
9945 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{closed()} instead.
9946 """
9947 pass
9948
9950 """(Deprecated) This is emitted when a new project has been created, after it has been saved.
9951
9952 This can be used to perform responses to the successful save of a new project.
9953
9954 @type NewProject: L{Project}
9955 @param NewProject: The newly-created project
9956 @rtype: None
9957 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{created()} instead.
9958 """
9959 pass
9960
9962 """(Deprecated) This is emitted just after a project is saved.
9963
9964 @type SavedProject: L{Project}
9965 @param SavedProject: The project that was saved
9966 @rtype: None
9967 @deprecated: This signal is deprecated, and will be removed in a future version. Please use L{saved()} instead.
9968 """
9969 pass
9970
9971 - def remove(self, rUUIDOrName):
9972 """Removes, or deletes, the project with the given UUID or name.
9973
9974 @type rUUIDOrName: str
9975 @param rUUIDOrName: The UUID or name of the project to remove. This is checked in the same way as in L{open()}.
9976 @rtype: None
9977 @raise ValueError: Raised if no project with the given UUID or name could be found.
9978 @raise RuntimeError: Raised if the project could not be removed because it was open or in use, or if the user cancelled the operation.
9979 """
9980 pass
9981
9982 - def rename(self, OldName, NewName):
9983 """Changes the name of a project.
9984
9985 @type OldName: str
9986 @param OldName: The UUID or name of the project to modify
9987 @type NewName: str
9988 @param NewName: The new name for the project. This must not be an empty string.
9989 @rtype: None
9990 @raise ValueError: Raised if no project with the given name exists, or if the new name was empty.
9991 """
9992 pass
9993
9994 - def saved(self, SavedProject):
9995 """This is emitted just after a project is saved.
9996
9997 @type SavedProject: L{Project}
9998 @param SavedProject: The project that was saved
9999 @rtype: None
10000 @see: L{aboutToSave()}
10001 """
10002 pass
10003
10005 """Displays the project creation dialog box.
10006
10007 @rtype: None
10008 """
10009 pass
10010
10011 projects = ProjectManager()
10214
10217 """Manages creation and manipulation of actions.
10218
10219 This class creates and manipulates Mari actions, which are used as menu commands, and can have shortcut keys bound to them. By default, any action created through scripting will be in the "/Mari/Scripts" path, but this can be customized if there is any need to avoid clashes.
10220
10221 Mari stores all of the available actions in a tree, and actions are identified by their path within this tree. For example, "/Mari/Tools/TestTool" refers to an action called TestTool in a subsection called Tools.
10222
10223 B{Example Code}
10224
10225 >>> # This example creates an action through mari.actions(ActionManager singleton instance) to print "Hello World" to the log and executes the action
10226 >>> import mari
10227 >>> action = mari.actions.create("MyCustomActions/Print Hello","mari.app.log('Hello World')")
10228 >>> action.trigger()
10229
10230 >>> # This example finds the action and executes it
10231 >>> import mari
10232 >>> action = mari.actions.find("Mari/Scripts/MyCustomActions/Print Hello")
10233 >>> action.trigger()
10234 """
10235
10237 """Returns the path of the action that is using the given shortcut.
10238
10239 @type Shortcut: str
10240 @param Shortcut: A text version of the shortcut you're interested in
10241 @rtype: str
10242 @return: The path to the action that uses the given shortcut, or an empty string if the shortcut is invalid or not in use
10243 """
10244 pass
10245
10246 - def addToSet(self, SetName, pAction):
10247 """Adds an action to an action set.
10248
10249 This will not modify the enabled state of the action.
10250
10251 @type SetName: str
10252 @param SetName: The name of the set to add the action to. If the set does not exist, it will be created
10253 @type pAction: L{Action}
10254 @param pAction: The action to add to the set
10255 @rtype: None
10256 @raise ValueError: Raised if the set name or action were invalid.
10257 @see: L{enableSet()}, L{sets()}, L{disableSet()}, L{removeFromSet()}
10258 """
10259 pass
10260
10261 - def create(self, rIdentifier, rCommand):
10262 """Creates a new action with the given name and scripting command.
10263
10264 The identifier supplied for an action is composed of an optional path and a name. The path, if supplied, gives the path in the action hierarchy where the action will be stored. These paths help conceptually group actions and avoid name clashes. If no path is provided to this function, it will use "/Mari/Scripts" by default. If a path is provided, it is assumed to be absolute if it starts with a slash (e.g. "/Mari/SomethingElse/" is used as is), or otherwise it is taken as relative (e.g. "My/Path/" becomes "/Mari/Scripts/My/Path/"). The remainder of the identifier is used as the display text for the action.
10265
10266 Both the path and the display text can contain spaces.
10267
10268 Note that you will need to assign the action to a menu or a shortcut before you will be able to do anything useful with it.
10269
10270 @type rIdentifier: str
10271 @param rIdentifier: The identifier that provides the action's path and display text. See the main description.
10272 @type rCommand: str
10273 @param rCommand: The scripting command to run when the action is activated.
10274 @rtype: L{ScriptAction}
10275 @return: A new action object.
10276 """
10277 pass
10278
10280 """Disables all actions in the given set.
10281
10282 @type SetName: str
10283 @param SetName: The name of the action set to disable
10284 @rtype: None
10285 @see: L{addToSet()}, L{enableSet()}, L{sets()}, L{removeFromSet()}
10286 """
10287 pass
10288
10290 """Enables all actions in the given set.
10291
10292 @type SetName: str
10293 @param SetName: The name of the action set to enable
10294 @rtype: None
10295 @see: L{addToSet()}, L{sets()}, L{disableSet()}, L{removeFromSet()}
10296 """
10297 pass
10298
10299 - def find(self, rPath):
10300 """Returns the Mari action that corresponds to the path provided.
10301
10302 Using this function, users can find an individual action. Calling L{Action.trigger()} on the action returned will execute it.
10303
10304 See L{create()} for a description of action paths.
10305
10306 @type rPath: str
10307 @param rPath: The path to the action to find
10308 @rtype: L{Action}
10309 @return: The requested action if found, or None otherwise
10310 @see: L{get()}
10311 """
10312 pass
10313
10314 - def get(self, rPath):
10315 """Returns the Mari action that corresponds to the path provided.
10316
10317 Using this function, users can find an individual action. Calling L{Action.trigger()} on the action returned will execute it.
10318
10319 See L{create()} for a description of action paths.
10320
10321 @type rPath: str
10322 @param rPath: The path to the action to find
10323 @rtype: L{Action}
10324 @return: The requested action
10325 @raise ValueError: Raised if the requested action was not found.
10326 @see: L{find()}
10327 """
10328 pass
10329
10330 - def list(self, rPath=""):
10331 """Returns a list of the available actions.
10332
10333 Without a parameter this action will return a list of all actions, including the full path The user may optionally pass in a path to a subtree. Given a subtree, only actions in that subtree will be returned.
10334
10335 @type rPath: str
10336 @param rPath: An optional path to a subtree. If provided, only actions in that subtree will be returned
10337 @rtype: list of str
10338 @return: A list of actions, including their path
10339 """
10340 pass
10341
10343 """Loads user shortcuts from the configuration file.
10344
10345 This is provided mainly for internal use, so user-specific shortcuts can be loaded after any shortcuts have been set up by the Python stage of the initialization process.
10346
10347 @rtype: None
10348 """
10349 pass
10350
10352 """Removes an action from an action set.
10353
10354 This will not modify the enabled state of the action.
10355
10356 @type SetName: str
10357 @param SetName: The set to remove the action from
10358 @type pAction: L{Action}
10359 @param pAction: The action to remove
10360 @rtype: None
10361 @raise ValueError: Raised if the set name or action were invalid.
10362 @see: L{addToSet()}, L{enableSet()}, L{disableSet()}, L{sets()}
10363 """
10364 pass
10365
10367 """Removes the given shortcut for the given action.
10368
10369 If the given shortcut is empty the first shortcut will be removed. If the action specified does not have any shortcuts, this function will complete successfully without raising an exception.
10370
10371 @type Path: str
10372 @param Path: The path to the action
10373 @type Shortcut: str
10374 @param Shortcut: The shortcut to remove
10375 @rtype: None
10376 @raise ValueError: Raised if no action with the given path was found.
10377 """
10378 pass
10379
10381 """Removes all shortcuts for the given action.
10382
10383 If the action specified does not any shortcuts, this function will complete successfully without raising an exception.
10384
10385 @type Path: str
10386 @param Path: The path to the action
10387 @rtype: None
10388 @raise ValueError: Raised if no action with the given path was found.
10389 """
10390 pass
10391
10393 """Sets the shortcut for the given action.
10394
10395 Shortcuts can be single keys ("F1"), keys with modifiers ("Ctrl+A"), or empty to specify no shortcut.
10396
10397 @type Path: str
10398 @param Path: The path to the action
10399 @type Shortcut: str
10400 @param Shortcut: The new shortcut string for the given action. Pass in an empty string to clear the shortcut
10401 @rtype: bool
10402 @return: Always True. On failure, it raises an exception. I{(See below - please do not use this return value)}
10403 @raise ValueError: Raised if no action with the given path was found, or if the shortcut string was invalid.
10404 @deprecated: Please avoid using the return value of this function. It will be removed in a future version.
10405 @see: L{shortcut()}
10406 """
10407 pass
10408
10410 """Returns the list of defined action set names.
10411
10412 L{Action} sets are groups of actions that can be enabled and disabled as a group. This can be used to easily configure Mari depending on the context. If, for example, you have actions that only work on floating point channels, they can be added to an action set, and then enabled or disabled depending on the currently selected channel.
10413
10414 Actions can be added to multiple sets. However, please note that the sets themselves do not have an enabled state; only the actions do. This means that, for example, if an action has been added to two sets, and L{enableSet()} is called on one and then L{disableSet()} is called on the other, the action will be disabled - but, if the calls are the other way around, it will be enabled. In other words, there is no way of saying "disable (or enable) this action if either of its two sets are disabled (or enabled)". If this behavior is not suitable, please define a new set and enable and disable that one separately.
10415
10416 @rtype: list of str
10417 @return: The list of defined action set names
10418 @see: L{addToSet()}, L{enableSet()}, L{disableSet()}, L{removeFromSet()}
10419 """
10420 pass
10421
10423 """Returns the first shortcut for the given action.
10424
10425 @type Path: str
10426 @param Path: The path to the action
10427 @rtype: str
10428 @return: A string returning the first shortcut for the given action, or an empty string if there is no shortcut.
10429 @see: L{setShortcut()}
10430 """
10431 pass
10432
10434 """Indicates whether the given shortcut is in use.
10435
10436 @type Shortcut: str
10437 @param Shortcut: The string version of the shortcut to check (e.g. "Ctrl+S")
10438 @rtype: bool
10439 @return: True if the shortcut is in use, or False otherwise
10440 """
10441 pass
10442
10444 """Returns all shortcuts for the given action.
10445
10446 @type Path: str
10447 @param Path: The path to the action
10448 @rtype: list of str
10449 @return: A list of all shortcuts for the given action, or an empty list if there is no shortcuts.
10450 """
10451 pass
10452
10453 actions = ActionManager()
10454
10455
10456 -class NodeContext(Metadata):
10457 """Provides shader node graph context functionality.
10458
10459 L{NodeContext} is a patricular context attached to a node. For example, the GLSL context of a node is how the node is represented in GLSL so that the GLSL code is used when rendered in the view port.
10460
10461 L{NodeContext} mechanism is used to add some custom contextual information to a node. A common usage would be to attach information about offline renderer so that the node graph can be processed and translated into the language of the offline renderer.
10462
10463 Each L{NodeContext} attached to a L{Node} is stored in Mari.
10464 """
10465
10467 """Return whether the given metadata is supported by this context.
10468
10469 A metadata supported by any context will be enabled for editing in the node property UI.
10470
10471 @type MetadataName: str
10472 @param MetadataName: The name of the metadata to query
10473 @rtype: bool
10474 @see: L{setMetadataSupported()}
10475 """
10476 pass
10477
10479 """Sets whether the metadata of the parent node is supported by this context.
10480
10481 A metadata supported by any context will be enabled for editing in the node property UI.
10482
10483 @type MetadataName: str
10484 @param MetadataName: The name of the metadata to set the support
10485 @type Supported: bool
10486 @param Supported: Whether the specified metadata is supported
10487 @rtype: None
10488 @see: L{metadataSupported()}
10489 """
10490 pass
10491
10492 - def __init__(self):
10493 """Sets to the settings specified by the given components.
10494
10495 @rtype: L{NodeContext}
10496 """
10497 pass
10498
10501 """This object manages projectors in the project, including creation and listing.
10502
10503 B{Example Code}
10504
10505 >>> # This examples shows how to create a new projector
10506 >>> import mari
10507 >>> projector = mari.projectors.create("Test Projector")
10508 >>> print projector.name()
10509 Test Projector
10510 >>> mari.projectors.remove(projector.name())
10511 """
10512
10514 """Creates a new projector with the given name.
10515
10516 @type Name: str
10517 @param Name: The name of the new projector to create. This must be non-empty and unique.
10518 @rtype: L{Projector}
10519 @raise ValueError: Raised if the name is empty, or if a projector with the given name already exists.
10520 @raise RuntimeError: Raised if no project is currently open.
10521 """
10522 pass
10523
10525 """Returns the currently selected projector.
10526
10527 @rtype: L{Projector}
10528 @return: The currently selected projector
10529 @raise RuntimeError: Raised if no project is currently open.
10530 @see: L{setCurrent()}
10531 """
10532 pass
10533
10534 - def find(self, Name):
10535 """Returns the projector with the given name, if found.
10536
10537 @type Name: str
10538 @param Name: The name of the projector to look for
10539 @rtype: L{Projector}
10540 @return: The projector if found, or None if not
10541 """
10542 pass
10543
10544 - def get(self, Name):
10545 """Returns the projector with the given name.
10546
10547 @type Name: str
10548 @param Name: The name of the projector to look for
10549 @rtype: L{Projector}
10550 @return: The projector with the given name
10551 @raise ValueError: Raised if no projector with the given name exists
10552 """
10553 pass
10554
10556 """Returns a list of all projectors in the project.
10557
10558 @rtype: list of L{Projector}
10559 @return: A list of all projectors in the project
10560 @raise RuntimeError: Raised if no project is currently open.
10561 """
10562 pass
10563
10564 - def load(self, Path, Options=[], CameraNames=None):
10565 """Loads a projector from the given file path.
10566
10567 Requests for projector loading are routed to the correct plugin based on file extension.
10568
10569 The following is an example of loading a camera from an alembic file with some additional camera options:
10570
10571 >>> import mari
10572 >>> filePath = "/tmp/test.abc"
10573 >>> options = ["FrameOffset = 1", "StartFrame = 2", "EndFrame=4"]
10574 >>> camerasToLoad = ["/CameraTopPersp/CameraTopPersp"]
10575 >>> mari.projectors.load(filePath, options, camerasToLoad)
10576
10577 @type Path: str
10578 @param Path: The path to the file to be loaded. A file may contain multiple projectors.
10579 @type Options: list of str
10580 @param Options: This is an optional parameter which can be used to pass options to the file loader. L{Options} should be in I{name=value} format. Some examples are StartFrame, EndFrame and FrameOffset.
10581 @type CameraNames: variant
10582 @param CameraNames: This is an optional list of cameras to load from the file. Each item of the list is a string, corresponding to the name of the camera in the source file.
10583 @rtype: list of L{Projector}
10584 @return: A list of the projectors loaded from the given file, empty list on failure
10585 @raise RuntimeError: Raised if no project is currently open.
10586 @raise ValueError: Raised if the options list contains invalid items.
10587 """
10588 pass
10589
10591 """Returns a list of the names of all projectors in the project.
10592
10593 @rtype: list of str
10594 @return: The names of all projectors in the project
10595 @raise RuntimeError: Raised if no projet is currently open.
10596 """
10597 pass
10598
10600 """Returns the quick projection settings.
10601
10602 @rtype: L{QuickProjector}
10603 @return: The quick projection settings.
10604 @raise RuntimeError: Raised if no project is currently open.
10605 """
10606 pass
10607
10609 """Removes, or deletes, the projector with the given name.
10610
10611 @type Name: str
10612 @param Name: The name of the projector to remove
10613 @rtype: None
10614 """
10615 pass
10616
10618 """Returns a list of all projectors in the project that are selected.
10619
10620 @rtype: list of L{Projector}
10621 @return: A list of all selected projectors in the project
10622 @raise RuntimeError: Raised if no project is currently open.
10623 """
10624 pass
10625
10627 """Sets the current projector.
10628
10629 @type Current: L{Projector}
10630 @param Current: The projector to make current
10631 @rtype: None
10632 @see: L{Projector.makeCurrent()}, L{current()}
10633 """
10634 pass
10635
10636 projectors = ProjectorManager()
10637
10638
10639 -class VectorN(object):
10640 """Objects of this class hold multi-dimensional coordinates.
10641
10642 Coordinates that represent UV, 3D, or 4D values should all be stored in objects of this type.
10643
10644 B{Example Code}
10645
10646 >>> # This example shows how to obtain the position of the 1st light
10647 >>> import mari
10648 >>> lights = mari.lights.list()
10649 >>> light_position = lights[0].position()
10650 >>> print light_position.className()
10651 VectorN
10652 """
10653
10655 """Returns the elements of the vector as a tuple.
10656
10657 @rtype: tuple of float
10658 @return: The elements of the vector in a tuple - e.g., (1.0, 2.0, 3.0)
10659 """
10660 pass
10661
10663 """Returns the length of the vector.
10664
10665 This is the same as L{size()}.
10666
10667 @rtype: int
10668 @return: The length of the vector
10669 """
10670 pass
10671
10673 """Returns the size of the vector.
10674
10675 This is the same as L{length()}.
10676
10677 @rtype: int
10678 @return: The size of the vector
10679 """
10680 pass
10681
10683 """Returns the 3rd component.
10684
10685 @rtype: float
10686 """
10687 pass
10688
10690 """Returns the 0th component.
10691
10692 @rtype: float
10693 """
10694 pass
10695
10697 """Returns the 1st component.
10698
10699 @rtype: float
10700 """
10701 pass
10702
10704 """Returns the 2nd component.
10705
10706 @rtype: float
10707 """
10708 pass
10709
10710 - def __init__(self, X=None, Y=None, Z=None, W=None):
10711 """Constructs a new vector.
10712
10713 A vector can be constructed from up to four components. The specified parameters should be either all float values for these components, or one single parameter which is a list containing float values.
10714
10715 For example:
10716 - C{mari.VectorN(1, 2) // 2D vector}
10717 - C{mari.VectorN(1, 2, 3) // 3D vector}
10718 - C{mari.VectorN([1, 2, 3]) // 3D vector}
10719
10720 @type X: variant
10721 @param X: Optional first element (float, or list of floats)
10722 @type Y: variant
10723 @param Y: Optional second element (float)
10724 @type Z: variant
10725 @param Z: Optional third element (float)
10726 @type W: variant
10727 @param W: Optional fourth element (float)
10728 @rtype: L{VectorN}
10729 """
10730 pass
10731
10732
10733 -class Shader(Metadata):
10734 """Provides access to Mari's real-time layer based display shaders.
10735
10736 Shaders are modules that combine the layer system's L{Channel} objects to produce a rendered output.
10737
10738 You can access shaders from a L{GeoEntity} - for example: C{mari.geo.current().shaderList()}
10739
10740 B{Example Code}
10741
10742 >>> # This example shows how to obtain the current shader
10743 >>> import mari
10744 >>> current_shader = mari.geo.current().currentShader()
10745 >>> print current_shader.className()
10746 Shader
10747
10748 @group Signals: nameChanged, parameterValueChanged
10749 """
10750
10752 """Returns a list of the L{Channel} objects in use by the shader.
10753
10754 @rtype: list of L{Channel}
10755 @return: The list of L{Channel} objects.
10756 """
10757 pass
10758
10760 """Returns the path of the diffuse component of the shader.
10761
10762 @rtype: str
10763 @return: The path of the diffuse component of the shader, which will be of the form C{'Lighting/Diffuse/Lambertian'} - or an empty string if this is a standalone shader.
10764 @see: L{layeredType()}, L{standaloneType()}, L{specularType()}
10765 """
10766 pass
10767
10769 """Retrieves the current value of a parameter from this shader.
10770
10771 @type ParameterName: str
10772 @param ParameterName: The name of the parameter to inspect.
10773 @rtype: variant
10774 @return: The current value of the parameter.
10775 @raise ValueError: Raised if name of the parameter does not match any existing items.
10776 @raise SystemError: Raised if there is problem obtaining the parameter value.
10777 @see: L{setParameter()}
10778 """
10779 pass
10780
10788
10796
10804
10806 """Returns True if the shader can contain ShaderStack channels.
10807
10808 @rtype: bool
10809 """
10810 pass
10811
10813 """Indicates whether this shader is locked and, if so, unmodifiable.
10814
10815 @rtype: bool
10816 @return: True if this shader is locked, or False if unlocked.
10817 """
10818 pass
10819
10821 """Returns True if the shader is used in a ShaderStack channel.
10822
10823 @rtype: bool
10824 """
10825 pass
10826
10828 """Returns True if the shader is one of the special system shaders.
10829
10830 @rtype: bool
10831 @see: L{GeoEntity.systemShader()}
10832 """
10833 pass
10834
10836 """Returns the path of the shader, if it is of a layered type.
10837
10838 @rtype: str
10839 @return: The path of the shader, which will be of the form C{'Lighting/Layered/Layered'} - or an empty string if this is not a layered shader.
10840 @see: L{standaloneType()}, L{specularType()}, L{diffuseType()}
10841 """
10842 pass
10843
10845 """Sets this shader as the currently active shader on its L{GeoEntity}.
10846
10847 @rtype: None
10848 """
10849 pass
10850
10852 """Returns the name of the shader.
10853
10854 @rtype: str
10855 @return: The name of this shader.
10856 @see: L{setName()}
10857 """
10858 pass
10859
10861 """This is emitted after the shader has had its name changed.
10862
10863 @type NewName: str
10864 @param NewName: The new name.
10865 @rtype: None
10866 """
10867 pass
10868
10870 """Returns the list of parameter names for this shader.
10871
10872 @rtype: list of str
10873 @return: A list of the parameter names for this shader.
10874 """
10875 pass
10876
10878 """This is emitted when a parameter value is changed.
10879
10880 @type Name: str
10881 @param Name: The name of the parameter that has been changed.
10882 @type Value: variant
10883 @param Value: The new value of the parameter.
10884 @rtype: None
10885 """
10886 pass
10887
10899
10901 """Sets the name of the shader.
10902
10903 @type Name: str
10904 @param Name: The new name for the shader.
10905 @rtype: None
10906 @see: L{name()}
10907 """
10908 pass
10909
10911 """Sets the value of a parameter on the shader.
10912
10913 @type ParameterName: str
10914 @param ParameterName: The name of the parameter to modify.
10915 @type NewValue: variant
10916 @param NewValue: The new value for the parameter. This can be of a variety of types.
10917 @rtype: None
10918 @raise ValueError: Raised if the parameter could not be found, or was invalid.
10919 @see: L{getParameter()}
10920 """
10921 pass
10922
10924 """Returns the node graph node that corresponds to this L{Shader}.
10925
10926 the node graph node that corresponds to this L{Shader}
10927
10928 @rtype: L{Node}
10929 """
10930 pass
10931
10933 """Returns the path of the specular component of the shader.
10934
10935 @rtype: str
10936 @return: The path of the specular component of the shader, which will be of the form C{'Lighting/Specular/Blinn'} - or an empty string if this is a standalone shader.
10937 @see: L{layeredType()}, L{standaloneType()}, L{diffuseType()}
10938 """
10939 pass
10940
10942 """Returns the path of the shader, if it is of a standalone type.
10943
10944 @rtype: str
10945 @return: The path of the shader, which will be of the form C{'Lighting/Standalone/Standard Lighting'} - or an empty string if this is not a standalone shader.
10946 @see: L{layeredType()}, L{specularType()}, L{diffuseType()}
10947 """
10948 pass
10949
10952 """
10953 @group Signals: nodeCreated
10954 """
10955
10957 """This is emitted after a new node has been created.
10958
10959 @type pNewNode: L{Node}
10960 @param pNewNode: The newly-added node
10961 @rtype: None
10962 """
10963 pass
10964
10967 """Handles the images available in the application.
10968
10969 B{Example Code}
10970
10971 >>> # This examples opens an image through ImageManager and obtains the Image object
10972 >>> import mari
10973 >>> import os
10974 >>> image_path = os.path.join(mari.resources.path(mari.resources.IMAGES),"NoThumb.png")
10975 >>> image = mari.images.load(image_path)
10976
10977 @cvar IMAGE_PRE_MULTIPLY_ALPHA: Convert pixels into premultiplied alpha format, if required.
10978 @cvar IMAGE_NO_PRE_MULTIPLY_ALPHA: Leave pixels as they are.
10979 @cvar IMAGE_COLOR_CONVERSION_NONE: No conversion required.
10980 @cvar IMAGE_COLOR_CONVERSION_LINEAR_TO_SRGB: Convert from linear to srgb.
10981 @group Signals: beginImageLoading, endImageLoading, handleProtocol, imageLoaded
10982 """
10983
10987
10988 IMAGE_PRE_MULTIPLY_ALPHA = 0
10989 IMAGE_NO_PRE_MULTIPLY_ALPHA = 1
10990
10992 """These are various options for colour conversion, when loading an image.
10993 @cvar IMAGE_COLOR_CONVERSION_NONE: No conversion required.
10994 @cvar IMAGE_COLOR_CONVERSION_LINEAR_TO_SRGB: Convert from linear to srgb.
10995 @note: These values are exposed in the parent class, but are also documented here for convenience.
10996 """
10997 IMAGE_COLOR_CONVERSION_NONE = 0
10998 IMAGE_COLOR_CONVERSION_LINEAR_TO_SRGB = 1
10999
11000 IMAGE_COLOR_CONVERSION_NONE = 0
11001 IMAGE_COLOR_CONVERSION_LINEAR_TO_SRGB = 1
11002
11003 - def add(self, ImageToAdd, Name=""):
11004 """Adds the given image to the image manager view.
11005
11006 Mari maintains a set of reference images that the user can access. This method adds the given image to the set of reference images
11007
11008 @type ImageToAdd: L{Image}
11009 @param ImageToAdd: The image object to add
11010 @type Name: str
11011 @param Name: The name of the image to be set to
11012 @rtype: None
11013 """
11014 pass
11015
11017 """Add a new images' category to L{Image} Manager palette.
11018
11019 Categories are shown as tabs.
11020
11021 @type CategoryName: str
11022 @param CategoryName: Name of an added category.
11023 @rtype: None
11024 """
11025 pass
11026
11027 - def addImage(self, ImageToAdd, Name=""):
11028 """Adds the given QImage to the image manager view.
11029
11030 Mari maintains a set of reference images that the user can access. This method adds the given QImage to the set of reference images
11031
11032 @type ImageToAdd: QImage
11033 @param ImageToAdd: The QImage object to add
11034 @type Name: str
11035 @param Name: The name of the image to be set to
11036 @rtype: L{Image}
11037 @return: The new reference image stored in the image manager.
11038 """
11039 pass
11040
11042 """This is emitted before image loading.
11043
11044 This signal can be used to detect when Mari is about to load one or more images.
11045
11046 @rtype: None
11047 """
11048 pass
11049
11051 """Get a list of all categories currently existing in L{Image} Manager palette.
11052
11053 @rtype: list of str
11054 @return: List of all categories in L{Image} Manager palette.
11055 """
11056 pass
11057
11059 """Query the supported list of export compression methods, for a given image extension.
11060
11061 B{Example Code}
11062
11063 >>> # This examples queries the compression methods for exporting an exr image
11064 >>> mari.images.compressionList("exr")
11065
11066 @type Extension: str
11067 @param Extension: The file extension, whose plugin to query for compression methods.
11068 @rtype: list of str
11069 @return: List of compression methods for the image export plugin.
11070 """
11071 pass
11072
11074 """Get the current images' category in L{Image} Manager palette.
11075
11076 Categories are shown as tabs.
11077
11078 @rtype: str
11079 @return: Name of the current images' category.
11080 """
11081 pass
11082
11084 """Query the default export compression method, for a given image extension.
11085
11086 B{Example Code}
11087
11088 >>> # This examples queries the default compression method for exporting an exr image
11089 >>> mari.images.defaultCompressionMethod("exr")
11090
11091 @type Extension: str
11092 @param Extension: The file extension, whose plugin to query for the compression method.
11093 @rtype: str
11094 @return: The default compression method for the image export plugin.
11095 """
11096 pass
11097
11109
11111 """This is emitted after image loading.
11112
11113 This signal can be used to detect when Mari has completed loading one or more images.
11114
11115 @rtype: None
11116 """
11117 pass
11118
11120 """Finds an image in the image manager view.
11121
11122 Mari maintains a set of reference images that the user can access. This method opens an image from this set of reference images.
11123
11124 @type Hash: str
11125 @param Hash: The hash of the image to retrieve.
11126 @rtype: L{Image}
11127 @return: The image object if found. If not found, it returns None.
11128 @raise ValueError: Raised if the specified hash was empty.
11129 """
11130 pass
11131
11133 """This is emitted when attempting to open image with unknown protocol.
11134
11135 @type url: str
11136 @rtype: bool
11137 """
11138 pass
11139
11141 """This is emitted when images are loaded.
11142
11143 @type Img: L{Image}
11144 @param Img: Newly loaded image.
11145 @rtype: None
11146 """
11147 pass
11148
11150 """Get a list of the image operations, registered by the image manager.
11151
11152 @rtype: list of L{ImageOperation}
11153 @return: A list of image operations.
11154 """
11155 pass
11156
11158 """Returns all of the currently open reference images.
11159
11160 @rtype: list of L{Image}
11161 @return: A list of all the currently open reference images
11162 """
11163 pass
11164
11166 """Loads images from an image file into the image manager view.
11167
11168 Mari maintains a set of reference images that the user can access. This method opens an image into this set of reference images.
11169
11170 @type Path: str
11171 @param Path: The path to the image file to open.
11172 @type Name: str
11173 @param Name: By default the name of the loaded image will be derived from the L{Path}. This optional parameter specifies a different name for the loaded image
11174 @type ConversionType: L{ImageColorSpaceConversionType}
11175 @param ConversionType: This specifies the conversion for the loaded image; it's no conversion by default.
11176 @type AlphaProcessing: L{ImageAlphaProcessing}
11177 @param AlphaProcessing: This specifies if the pixels are converted into a premultiplied alpha format; conversion is the default.
11178 @rtype: list of L{Image}
11179 @return: A list of all the images from the file. There will be more than one image for layered image files.
11180 @raise ValueError: Raised if the specified path was empty.
11181 @raise IOError: Raised if there was an error loading the image.
11182 @deprecated: This method will be removed in a future version. Please use L{open()} instead.
11183 """
11184 pass
11185
11187 """Loads images from an image file into the image manager view.
11188
11189 Mari maintains a set of reference images that the user can access. This method opens an image into this set of reference images.
11190
11191 @type Path: str
11192 @param Path: The path to the image file to open.
11193 @type Config: L{ColorspaceConfig}
11194 @param Config: The colorspace configuration to use. If none is given then a default configuration will be used.
11195 @type AlphaProcessing: L{ImageAlphaProcessing}
11196 @param AlphaProcessing: This specifies if the pixels are converted into a premultiplied alpha format; conversion is the default.
11197 @type Name: str
11198 @param Name: By default the name of the loaded image will be derived from the L{Path}. This optional parameter specifies a different name for the loaded image
11199 @rtype: list of L{Image}
11200 @return: A list of all the images from the file. There will be more than one image for layered image files.
11201 @raise ValueError: Raised if the specified path was empty, the colorspace configuration file is invalid, or the colorspaces are invalid.
11202 @raise IOError: Raised if there was an error loading the image.
11203 """
11204 pass
11205
11207 """Registers the given L{ImageProtocolHandler} object with associated protocol.
11208
11209 @type Protocol: str
11210 @param Protocol: the protocol name for the handler to handle
11211 @type Handler: L{ImageProtocolHandler}
11212 @param Handler: the L{ImageProtocolHandler} object to handle the protocol
11213 @rtype: bool
11214 @return: ean indicating whether it was successful to register the handler
11215 @note: L{ImageProtocolHandler}
11216 """
11217 pass
11218
11219 - def remove(self, ImageToRemove):
11220 """Removes the given image from the image manager view.
11221
11222 Mari maintains a set of reference images that the user can access. This method removes the given image from the set of reference images
11223
11224 @type ImageToRemove: L{Image}
11225 @param ImageToRemove: The image object to remove
11226 @rtype: None
11227 @raise ValueError: Raised if the given image isn't in the image manager.
11228 """
11229 pass
11230
11232 """Remove images of a chosen category and the category itself from L{Image} Manager palette.
11233
11234 Categories are shown as tabs.
11235
11236 @type CategoryName: str
11237 @param CategoryName: Name of the removed category.
11238 @rtype: bool
11239 @return: True, if the chosen category was successfully removed. False otherwise.
11240 """
11241 pass
11242
11244 """Saves a list of images to a file.
11245
11246 Mari supports saving images to a variety of formats. Some formats support saving multiple images as layers. Others only support single images. This function will save a list of images to a specified path.
11247
11248 If a non-layered format is chosen, the list must contain just one image.
11249
11250 If a layered format is chosen, the names of the layers are of the form 'Layer N' where N is the zero-based index of the image in the provided list. There may be other restrictions on each image forming a layer, depending on the file format.
11251
11252 @type Images: list of L{Image}
11253 @param Images: A list containing the image(s) to save.
11254 @type Path: str
11255 @param Path: The path to save the image file(s) to.
11256 @rtype: bool
11257 @return: Always True. On failure, it raises an exception.
11258 @raise ValueError: Raised if the specified path was empty, or no Images were provided.
11259 @raise IOError: Raised if there was an error saving the image.
11260 """
11261 pass
11262
11264 """Select a current images' category in L{Image} Manager palette.
11265
11266 Categories are shown as tabs.
11267
11268 @type CategoryName: str
11269 @param CategoryName: Name of a selected category.
11270 @rtype: bool
11271 @return: True, if the chosen category exists and became selected. False otherwise.
11272 """
11273 pass
11274
11276 """Returns all of the currently open and selected reference images.
11277
11278 @rtype: list of L{Image}
11279 @return: A list of all the currently open and selected reference images
11280 """
11281 pass
11282
11295
11309
11319
11321 """Returns a list of the supported texture sizes.
11322
11323 Mari supports power of two sized textures, with the exact list provided by this function. Textures within channels may be created at any of these sizes.
11324
11325 Note that only square textures are supported.
11326
11327 @rtype: list of variant
11328 @return: The supported texture sizes in pixels, in the format: ((width1, height1), (width2, height2)...)
11329 """
11330 pass
11331
11333 """Returns a list of the supported texture sizes.
11334
11335 Mari supports power of two sized textures, with the exact list provided by this function. Textures within channels may be created at any of these sizes.
11336
11337 Note that only square textures are supported.
11338
11339 @rtype: list of QSize
11340 @return: A list of QSize objects that specify valid texture sizes
11341 @deprecated: Please use L{supportedTextureSizeList()} instead of this function.
11342 """
11343 pass
11344
11357
11358
11359 -class Color(object):
11360 """Objects of this class hold information about an individual color value.
11361
11362 All channels are specified in the range [0, 1] - so passing in a value of 1 will set the channel to 100% intensity.
11363
11364 RGB and HSV/L values are updated automatically. For example, if you set the color from RGB values, you can immediately retrieve the HSV equivalents of those if desired.
11365
11366 B{Example Code}
11367
11368 >>> # This example constructs a Color object and sets the foreground color with it
11369 >>> import mari
11370 >>> foreground_color = mari.Color(1,1,0,1)
11371 >>> mari.colors.setForeground(foreground_color)
11372
11373 >>> # This example obtains the current foreground color
11374 >>> import mari
11375 >>> foreground_color = mari.colors.foreground()
11376 >>> print foreground_color.toString()
11377 (1,1,0,1)
11378 """
11379
11381 """Returns the alpha component.
11382
11383 @rtype: float
11384 @see: L{setA()}
11385 """
11386 pass
11387
11389 """Returns the blue component.
11390
11391 @rtype: float
11392 @see: L{setB()}
11393 """
11394 pass
11395
11397 """Returns the exposure value of the color.
11398
11399 @rtype: float
11400 """
11401 pass
11402
11404 """Returns the green component.
11405
11406 @rtype: float
11407 @see: L{setG()}
11408 """
11409 pass
11410
11412 """Returns the hue component.
11413
11414 @rtype: float
11415 @see: L{setH()}
11416 """
11417 pass
11418
11420 """Returns the color as a list of hue, saturation, and lightness components.
11421
11422 @rtype: list of float
11423 """
11424 pass
11425
11427 """Returns the color as a list of hue, saturation, lightness, and alpha components.
11428
11429 @rtype: list of float
11430 """
11431 pass
11432
11434 """Returns the color as a list of hue, saturation, and value components.
11435
11436 @rtype: list of float
11437 """
11438 pass
11439
11441 """Returns the color as a list of hue, saturation, value, and alpha components.
11442
11443 @rtype: list of float
11444 """
11445 pass
11446
11448 """Returns the lightness component.
11449
11450 @rtype: float
11451 @see: L{setL()}
11452 """
11453 pass
11454
11456 """Returns the luminance value of the color.
11457
11458 @rtype: float
11459 """
11460 pass
11461
11463 """Returns the red component.
11464
11465 @rtype: float
11466 @see: L{setR()}
11467 """
11468 pass
11469
11471 """Returns the color as a list of red, green, and blue components.
11472
11473 @rtype: list of float
11474 """
11475 pass
11476
11478 """Returns the color as a list of red, green, blue, and alpha components.
11479
11480 @rtype: list of float
11481 """
11482 pass
11483
11485 """Returns the saturation component.
11486
11487 @rtype: float
11488 @see: L{setS()}
11489 """
11490 pass
11491
11492 - def setA(self, Alpha):
11493 """Sets the alpha component.
11494
11495 @type Alpha: float
11496 @rtype: None
11497 @see: L{a()}
11498 """
11499 pass
11500
11501 - def setB(self, Blue):
11502 """Sets the blue component.
11503
11504 @type Blue: float
11505 @rtype: None
11506 @see: L{b()}
11507 """
11508 pass
11509
11510 - def setG(self, Green):
11511 """Sets the green component.
11512
11513 @type Green: float
11514 @rtype: None
11515 @see: L{g()}
11516 """
11517 pass
11518
11519 - def setH(self, Hue):
11520 """Sets the hue component.
11521
11522 @type Hue: float
11523 @rtype: None
11524 @see: L{h()}
11525 """
11526 pass
11527
11528 - def setHSL(self, Hue, Saturation, Lightness):
11529 """Sets the color using hue, saturation, and lightness components.
11530
11531 @type Hue: float
11532 @type Saturation: float
11533 @type Lightness: float
11534 @rtype: None
11535 """
11536 pass
11537
11538 - def setHSLA(self, Hue, Saturation, Lightness, Alpha):
11539 """Sets the color using hue, saturation, lightness, and alpha components.
11540
11541 @type Hue: float
11542 @type Saturation: float
11543 @type Lightness: float
11544 @type Alpha: float
11545 @rtype: None
11546 """
11547 pass
11548
11549 - def setHSV(self, Hue, Saturation, Value):
11550 """Sets the color using hue, saturation, and value components.
11551
11552 @type Hue: float
11553 @type Saturation: float
11554 @type Value: float
11555 @rtype: None
11556 """
11557 pass
11558
11559 - def setHSVA(self, Hue, Saturation, Value, Alpha):
11560 """Sets the color using hue, saturation, value, and alpha components.
11561
11562 @type Hue: float
11563 @type Saturation: float
11564 @type Value: float
11565 @type Alpha: float
11566 @rtype: None
11567 """
11568 pass
11569
11570 - def setL(self, Lightness):
11571 """Sets the lightness component.
11572
11573 @type Lightness: float
11574 @rtype: None
11575 @see: L{l()}
11576 """
11577 pass
11578
11579 - def setR(self, Red):
11580 """Sets the red component.
11581
11582 @type Red: float
11583 @rtype: None
11584 @see: L{r()}
11585 """
11586 pass
11587
11588 - def setRGB(self, Red, Green, Blue):
11589 """Sets the color using red, green, and blue components.
11590
11591 @type Red: float
11592 @type Green: float
11593 @type Blue: float
11594 @rtype: None
11595 """
11596 pass
11597
11598 - def setRGBA(self, Red, Green, Blue, Alpha):
11599 """Sets the color using red, green, blue, and alpha components.
11600
11601 @type Red: float
11602 @type Green: float
11603 @type Blue: float
11604 @type Alpha: float
11605 @rtype: None
11606 """
11607 pass
11608
11609 - def setS(self, Saturation):
11610 """Sets the saturation component.
11611
11612 @type Saturation: float
11613 @rtype: None
11614 @see: L{s()}
11615 """
11616 pass
11617
11618 - def setV(self, Value):
11619 """Sets the value component.
11620
11621 @type Value: float
11622 @rtype: None
11623 @see: L{v()}
11624 """
11625 pass
11626
11628 """Returns a string representation of the color.
11629
11630 For example, opaque black will be displayed as "(0,0,0,1)".
11631
11632 @rtype: str
11633 """
11634 pass
11635
11637 """Returns a user-readable description of the color.
11638
11639 This will be a three line string showing the RGB, HSV, and alpha components.
11640
11641 @rtype: str
11642 """
11643 pass
11644
11646 """Returns the value component.
11647
11648 @rtype: float
11649 @see: L{setV()}
11650 """
11651 pass
11652
11653 - def __init__(self, Red=0.0, Green=0.0, Blue=0.0, Alpha=1.0):
11654 """Sets to the color specified by the given components.
11655
11656 All color components are optional. This provides the convenience of being able to specify only R, G, and B components to default to opaque (100% alpha), or not provide any parameters to create a default color of opaque black.
11657
11658 @type Red: float
11659 @type Green: float
11660 @type Blue: float
11661 @type Alpha: float
11662 @rtype: L{Color}
11663 """
11664 pass
11665
11668 """Handles the L{OpenColorIO} colorspace transforms in the application.
11669
11670 @cvar COLOR_PICKER_RAW: No colorspace conversion is applied. The raw values are displayed on the monitor.
11671 @cvar COLOR_PICKER_COLOR_MANAGER: The color values are converted using the current color profile set on the color manager.
11672 @cvar COLOR_PICKER_OCIO: The color values are converted to the current default monitor colorspace set on the current project using OCIO.
11673 @group Signals: colorPickerModeChanged, lutSizeChanged
11674 """
11675
11677 """These are used to define the various modes that the color swatches and pickers can be displayed in.
11678 @cvar COLOR_PICKER_RAW: No colorspace conversion is applied. The raw values are displayed on the monitor.
11679 @cvar COLOR_PICKER_COLOR_MANAGER: The color values are converted using the current color profile set on the color manager.
11680 @cvar COLOR_PICKER_OCIO: The color values are converted to the current default monitor colorspace set on the current project using OCIO.
11681 @note: These values are exposed in the parent class, but are also documented here for convenience.
11682 """
11683 COLOR_PICKER_RAW = 0
11684 COLOR_PICKER_COLOR_MANAGER = 1
11685 COLOR_PICKER_OCIO = 2
11686
11687 COLOR_PICKER_RAW = 0
11688 COLOR_PICKER_COLOR_MANAGER = 1
11689 COLOR_PICKER_OCIO = 2
11690
11692 """Returns the method in which we are to display color swatches and pickers.
11693
11694 @rtype: L{ColorPickerMode}
11695 @return: The mode of the color swatches and pickers.
11696 @see: L{setColorPickerMode()}
11697 """
11698 pass
11699
11701 """This is emitted after the method in which we are to display color swatches and pickers is modified.
11702
11703 @type Mode: L{OpenColorIO.ColorPickerMode}
11704 @rtype: None
11705 """
11706 pass
11707
11709 """Returns the colorspace at a position within an OCIO config file.
11710
11711 @type Config: str
11712 @param Config: The name of a standard OCIO config file or the path to a custom one.
11713 @type Index: int
11714 @param Index: The index of the colorspace to return.
11715 @rtype: str
11716 @return: The colorspace at a particular position in the OCIO config file.
11717 @raise ValueError: Raised if the OCIO config file is invalid or the index is out of range.
11718 """
11719 pass
11720
11722 """Returns the number of colorspaces within an OCIO config file.
11723
11724 This doesn't include the extra options for the stages such as 'Automatic'.
11725
11726 @type Config: str
11727 @param Config: The name of a standard OCIO config file or the path to a custom one.
11728 @rtype: int
11729 @return: The number of colorspaces in the OCIO config file.
11730 @raise ValueError: Raised if the OCIO config file is invalid.
11731 """
11732 pass
11733
11735 """Returns the internal description of an OCIO config file.
11736
11737 @type Config: str
11738 @param Config: The name of a standard OCIO config file or the path to a custom one.
11739 @rtype: str
11740 @return: The internal description of the OCIO config file.
11741 @raise ValueError: Raised if the OCIO config file is invalid.
11742 """
11743 pass
11744
11746 """Returns the current colorspace configuration.
11747
11748 This will be the configuration of the current active image set. If no image set is active then the configuration of the current channel is returned. If no current configuration is active then None is returned.
11749
11750 @rtype: L{ColorspaceConfig}
11751 @return: The current colorspace defaults.
11752 """
11753 pass
11754
11756 """Returns the current colorspace defaults.
11757
11758 When a project is opened then this will be the colorspace defaults of the project. And if a project is not opened this will the global defaults for Mari.
11759
11760 @rtype: L{ColorspaceDefaults}
11761 @return: The current colorspace defaults.
11762 """
11763 pass
11764
11766 """Returns the name of the standard OCIO config file used by default.
11767
11768 @rtype: str
11769 @return: The name of the default OCIO config file.
11770 """
11771 pass
11772
11774 """Indicates whether a colorspace or role is present within an OCIO config file.
11775
11776 @type Config: str
11777 @param Config: The name of a standard OCIO config file or the path to a custom one.
11778 @type Name: str
11779 @param Name: The name of the colorspace or role to look for.
11780 @rtype: bool
11781 @return: True if the colorspace is present, False otherwise.
11782 """
11783 pass
11784
11785 - def hasRole(self, Config, Name):
11786 """Indicates whether a role is present within an OCIO config file.
11787
11788 @type Config: str
11789 @param Config: The name of a standard OCIO config file or the path to a custom one.
11790 @type Name: str
11791 @param Name: The name of the role to look for.
11792 @rtype: bool
11793 @return: True if the role is present, False otherwise.
11794 """
11795 pass
11796
11798 """Indicates whether an OCIO config file is valid.
11799
11800 @type Config: str
11801 @param Config: The name of a standard OCIO config file or the path to a custom one.
11802 @rtype: bool
11803 @return: True if the OCIO config file is valid, False otherwise.
11804 """
11805 pass
11806
11825
11827 """Returns True if a name is one of the standard OCIO config files packaged with Mari.
11828
11829 @type Name: str
11830 @param Name: The name to check.
11831 @rtype: bool
11832 @return: True if the name is a standard OCIO config.
11833 """
11834 pass
11835
11850
11852 """Returns the size of the 3D LUT used in color-correcting the user interface.
11853
11854 @rtype: int
11855 @return: The size of the 3D LUT.
11856 @see: L{setLutSize()}
11857 """
11858 pass
11859
11861 """This is emitted after the size of the 3D LUT used in color-correcting the user interface is modified.
11862
11863 @type Size: int
11864 @rtype: None
11865 """
11866 pass
11867
11869 """Returns the longest, right-most, colorspace substring from the given string.
11870
11871 @type Config: str
11872 @param Config: The name of a standard OCIO config file or the path to a custom one.
11873 @type Str: str
11874 @param Str: The string to parse for colorspace.
11875 @rtype: str
11876 @return: The longest, right-most, colorspace substring.
11877 @raise ValueError: Raised if the OCIO config file or either the input and output colorspaces are invalid.
11878 """
11879 pass
11880
11881 - def role(self, Config, Index):
11882 """Returns the role at a position within an OCIO config file.
11883
11884 @type Config: str
11885 @param Config: The name of a standard OCIO config file or the path to a custom one.
11886 @type Index: int
11887 @param Index: The index of the role to return.
11888 @rtype: str
11889 @return: The role at a particular position in the OCIO config file.
11890 @raise ValueError: Raised if the OCIO config file is invalid or the index is out of range.
11891 """
11892 pass
11893
11895 """Returns the number of roles within an OCIO config file.
11896
11897 @type Config: str
11898 @param Config: The name of a standard OCIO config file or the path to a custom one.
11899 @rtype: int
11900 @return: The number of roles in the OCIO config file.
11901 @raise ValueError: Raised if the OCIO config file is invalid.
11902 """
11903 pass
11904
11906 """Sets the method in which we are to display color swatches and pickers.
11907
11908 @type Mode: L{ColorPickerMode}
11909 @param Mode: The mode of the color swatches and pickers.
11910 @rtype: None
11911 @raise ValueError: Raised if the mode is invalid.
11912 @see: L{colorPickerMode()}
11913 """
11914 pass
11915
11917 """Sets the size of the 3D LUT used in color-correcting the user interface.
11918
11919 The size must be either 16, 32, 64, or 128.
11920
11921 @type Size: int
11922 @rtype: None
11923 @raise ValueError: Raised if the size is invalid.
11924 @see: L{lutSize()}
11925 """
11926 pass
11927
11943
11975
11992
11994 """Returns the absolute path of a standard OCIO config file packaged with Mari.
11995
11996 @type Config: str
11997 @param Config: The name of a standard OCIO config file packaged with Mari.
11998 @rtype: str
11999 @return: The absolute path to the OCIO config file.
12000 @raise ValueError: Raised if 'Config' is not the name of a standard OCIO config file packaged with Mari.
12001 """
12002 pass
12003
12005 """Returns the names of the standard OCIO config files packaged with Mari.
12006
12007 @rtype: list of str
12008 @return: A list of all standard OCIO config files packaged with Mari.
12009 """
12010 pass
12011
12013 """Returns the corresponding colorspace for a role.
12014
12015 @type Config: str
12016 @param Config: The name of a standard OCIO config file or the path to a custom one.
12017 @type Role: str
12018 @param Role: The role to return the corresponding colorspace for.
12019 @rtype: str
12020 @return: The colorspace that corresponds to the role.
12021 @raise ValueError: Raised if the OCIO config file is invalid.
12022 """
12023 pass
12024
12041
12058
12061 """A copy of the state of an object at a particular time.
12062
12063 By creating snapshots, users can easily preserve the state of an object and return to that state at some later time.
12064
12065 For example, this could be used to preserve the history of a design, or to try new ideas without risking the current textures. The user could snapshot the current state, paint some modifications, ask for approval, and if the changes are not accepted, quickly and easily revert to the previous state.
12066
12067 B{Example Code}
12068
12069 >>> # This example shows how to obtain the current channel of the current GeoEntity object
12070 >>> import mari
12071 >>> channel = mari.geo.current().currentChannel()
12072 >>> channel_snapshot = channel.createSnapshot("Test Snapshot")
12073
12074 @group Signals: creationDateChanged, creatorChanged, idChanged, nameChanged, previewChanged
12075 """
12076
12078 """Returns the date and time that the snapshot was created.
12079
12080 @rtype: QDateTime
12081 @return: The date and time of creation of the snapshot
12082 @see: L{setCreationDate()}
12083 """
12084 pass
12085
12087 """This is emitted when the date or time of creation changes for the snapshot.
12088
12089 @type DateTime: QDateTime
12090 @param DateTime: The new date and time
12091 @rtype: None
12092 """
12093 pass
12094
12096 """Returns the name of the user who created the snapshot.
12097
12098 @rtype: str
12099 @return: The user name of the creator of the snapshot
12100 @see: L{setCreator()}
12101 """
12102 pass
12103
12105 """This is emitted when the creator of the snapshot changes.
12106
12107 @type Creator: str
12108 @param Creator: The new creator of the snapshot
12109 @rtype: None
12110 """
12111 pass
12112
12114 """Indicates whether the snapshot has a valid preview image set.
12115
12116 @rtype: bool
12117 @return: True if a valid preview has been set, or False otherwise
12118 @see: L{setPreview()}, L{preview()}
12119 """
12120 pass
12121
12123 """Returns the identifier of the snapshot.
12124
12125 @rtype: str
12126 @return: The identifier of the snapshot. This UUID may not be human readable, and may take the form of a long number string.
12127 @see: L{setID()}
12128 """
12129 pass
12130
12132 """This is emitted when the ID of the snapshot changes.
12133
12134 @type NewID: str
12135 @param NewID: The new identifier of the snapshot
12136 @rtype: None
12137 """
12138 pass
12139
12141 """Returns the descriptive name of the snapshot.
12142
12143 @rtype: str
12144 @return: The name of the snapshot
12145 @see: L{setName()}
12146 """
12147 pass
12148
12150 """This is emitted when the name of the snapshot changes.
12151
12152 @type Name: str
12153 @param Name: The new name for this snapshot
12154 @rtype: None
12155 """
12156 pass
12157
12159 """Returns a preview image of the snapshot.
12160
12161 @rtype: QPixmap
12162 @return: The current preview image
12163 @note: Preview images are not created for snapshots automatically. L{Canvas.captureImage()} can provide useful data for this purpose.
12164 @see: L{setPreview()}, L{hasPreview()}
12165 """
12166 pass
12167
12169 """This is emitted after the preview image for the snapshot changes.
12170
12171 @type pSnapshot: L{Snapshot}
12172 @rtype: None
12173 """
12174 pass
12175
12177 """Sets the date of the creation of the snapshot.
12178
12179 @type DateTime: QDateTime
12180 @param DateTime: The date and time the snapshot was created
12181 @rtype: None
12182 @see: L{creationDate()}
12183 """
12184 pass
12185
12187 """Sets the name of the creator of the snapshot.
12188
12189 The creator is set automatically from the system on creation of a snapshot.
12190
12191 This method can be used to override the default value if required.
12192
12193 @type Creator: str
12194 @param Creator: The name of the person who created the snapshot
12195 @rtype: None
12196 @see: L{creator()}
12197 """
12198 pass
12199
12200 - def setID(self, NewID):
12201 """Sets the identifier of the snapshot.
12202
12203 The identifier is any (generally numeric) reproducible string to identify the snapshot or group of snapshots. If no custom ID is supplied, one is generated internally.
12204
12205 The ID can be used to group snapshots together across objects. For example, if you want to create a snapshot of five different objects at the same time, you can generate an ID and assign it to all of the snapshots. This makes an association between them, and then they can then be used as a group.
12206
12207 An example of this is the "snapshot all channels" option. In that case, all of the snapshots maintain the same ID, and can be reverted as a set.
12208
12209 @type NewID: str
12210 @param NewID: The new identifier to use. This does not need to be unique between snapshots.
12211 @rtype: None
12212 @see: L{id()}
12213 """
12214 pass
12215
12217 """Changes the descriptive name of the snapshot that is displayed to users.
12218
12219 There is no required naming standard for snapshots, so this can be written as clearly as desired - e.g. "new test version".
12220
12221 @type NewName: str
12222 @param NewName: A descriptive name for the snapshot for users
12223 @rtype: None
12224 @raise ValueError: Raised if the supplied name string was empty.
12225 @see: L{name()}
12226 """
12227 pass
12228
12230 """Sets the preview image of the snapshot.
12231
12232 @type NewImage: QPixmap
12233 @param NewImage: The new preview image to store
12234 @rtype: None
12235 @see: L{hasPreview()}, L{preview()}
12236 """
12237 pass
12238
12241 """Manages creation and manipulation of palettes (dockable widgets).
12242
12243 Palettes are dockable widgets that can be moved around and configured by the user.
12244
12245 B{Example Code}
12246
12247 >>> # This example shows how to create a palette with a label
12248 >>> import mari, PySide
12249 >>> label = PySide.QtGui.QLabel("Hello World")
12250 >>> new_palette = mari.palettes.create("Hello Palette",label)
12251 >>> mari.palettes.remove(new_palette.name());
12252 """
12253
12254 - def create(self, rName, pBodyWidget):
12255 """Creates a new palette with the given name.
12256
12257 @type rName: str
12258 @param rName: The name of the new palette to create. This must be non-empty and unique, or the function will raise an exception. The name will be initially used as both the full and short name for the palette.
12259 @type pBodyWidget: QWidget
12260 @param pBodyWidget: The widget to set as the palette's body - i.e. the one that holds everything to display for the palette. This can be any PySide widget. There used to be a method a second parameter as a string path, this is accepted but will be depricated. Use L{createWithIcon()} instead.
12261 @rtype: L{Palette}
12262 @raise ValueError: Raised if the name is empty, or if a palette with the given name already exists. A non-valid widget in pBodyWidget will also Raise this exception.
12263 """
12264 pass
12265
12267 """Creates a new palette with the given name.
12268
12269 @type rName: str
12270 @param rName: The name of the new palette to create. This must be non-empty and unique, or the function will raise an exception. The name will be initially used as both the full and short name for the palette.
12271 @type rIconPath: str
12272 @param rIconPath: The filename of the icon to use for the palette.
12273 @type pBodyWidget: QWidget
12274 @param pBodyWidget: The widget to set as the palette's body - i.e. the one that holds everything to display for the palette.
12275 @rtype: L{Palette}
12276 @raise ValueError: Raised if the name is empty, or if a palette with the given name already exists.
12277 """
12278 pass
12279
12280 - def find(self, rName):
12281 """Returns the palette with the given full name.
12282
12283 Note that this returns the palette with the given full name - i.e. the one displayed on the top of the palette - rather than the one on the palette tab.
12284
12285 @type rName: str
12286 @rtype: L{Palette}
12287 @return: The palette object if found, or None if not.
12288 @see: L{get()}
12289 """
12290 pass
12291
12292 - def get(self, rName):
12293 """Returns the palette with the given full name.
12294
12295 Note that this returns the palette with the given full name - i.e. the one displayed on the top of the palette - rather than the one on the palette tab.
12296
12297 @type rName: str
12298 @rtype: L{Palette}
12299 @return: The palette object.
12300 @raise ValueError: Raised if no palette with the given full name was found.
12301 @see: L{find()}
12302 """
12303 pass
12304
12306 """Returns a list of all registered palettes.
12307
12308 @rtype: list of L{Palette}
12309 """
12310 pass
12311
12313 """Removes, or deletes, the palette with the given name.
12314
12315 @type rName: str
12316 @param rName: The name of the palette to remove
12317 @rtype: None
12318 @raise ValueError: Raised if the name is empty, or if no palette with the given name exists.
12319 """
12320 pass
12321
12322 palettes = PaletteManager()
12326 """Projectors store the specific camera details of a particular view.
12327
12328 This includes the rotation, zoom, and orientation of the view, plus the current paintable area, painting mode, and mask settings. This is much like a bookmark or snapshot of a view.
12329
12330 Use the L{camera()} attached to the projector to access its camera-like properties, such as its current position and orientation.
12331
12332 You can access projectors through the L{ProjectorManager} - for example: C{mari.projectors.list()}
12333
12334 B{Example Code}
12335
12336 >>> # This examples shows how to create a new projector
12337 >>> import mari
12338 >>> projector = mari.projectors.create("Test Projector")
12339 >>> print projector.name()
12340 Test Projector
12341 >>> mari.projectors.remove(projector.name())
12342
12343 @cvar DEPTH_BYTE: Standard eight bit depth.
12344 @cvar DEPTH_HALF: Half-float depth.
12345 @cvar DEPTH_FLOAT: Full float depth.
12346 @cvar FRONT: L{Project} on front faces only.
12347 @cvar THROUGH: L{Project} on all faces.
12348 @cvar FLAT: Flat shading.
12349 @cvar BASIC: Simple lighting.
12350 @cvar FULL: Full detail lighting.
12351 @group Signals: aboutToSaveImage, exportColorspaceConfigChanged, frameOffsetChanged, importColorspaceConfigChanged, nameChanged
12352 """
12353
12355 """These are the bit depths supported by projectors.
12356 @cvar DEPTH_BYTE: Standard eight bit depth.
12357 @cvar DEPTH_HALF: Half-float depth.
12358 @cvar DEPTH_FLOAT: Full float depth.
12359 @note: These values are exposed in the parent class, but are also documented here for convenience.
12360 """
12361 DEPTH_BYTE = 8
12362 DEPTH_HALF = 16
12363 DEPTH_FLOAT = 32
12364
12365 DEPTH_BYTE = 8
12366 DEPTH_HALF = 16
12367 DEPTH_FLOAT = 32
12368
12370 """Specifies ways to project via depth - front only, or through all faces.
12371 @cvar FRONT: L{Project} on front faces only.
12372 @cvar THROUGH: L{Project} on all faces.
12373 @note: These values are exposed in the parent class, but are also documented here for convenience.
12374 """
12375 FRONT = 0
12376 THROUGH = 1
12377
12378 FRONT = 0
12379 THROUGH = 1
12380
12382 """Specifies available lighting detail levels.
12383 @cvar FLAT: Flat shading.
12384 @cvar BASIC: Simple lighting.
12385 @cvar FULL: Full detail lighting.
12386 @note: These values are exposed in the parent class, but are also documented here for convenience.
12387 """
12388 FLAT = 0
12389 BASIC = 1
12390 FULL = 2
12391
12392 FLAT = 0
12393 BASIC = 1
12394 FULL = 2
12395
12397 """This is emitted just before a unproject image is saved.
12398
12399 @type SaveImage: L{Image}
12400 @param SaveImage: The image that is going to be saved
12401 @rtype: None
12402 """
12403 pass
12404
12406 """Returns the current bit depth of the projector.
12407
12408 @rtype: L{BitDepth}
12409 @return: The current bit depth of the projector
12410 @see: L{setBitDepth()}
12411 """
12412 pass
12413
12415 """Returns the camera attached to the projector.
12416
12417 Use this to access the projector's camera-like properties, such as its current position and orientation.
12418
12419 @rtype: L{Camera}
12420 """
12421 pass
12422
12424 """Returns the color clamping behavior of the projector.
12425
12426 @rtype: bool
12427 @return: True if the colors are clamped to the 0..1 range on output, or False otherwise
12428 @see: L{setClampColors()}
12429 """
12430 pass
12431
12433 """Returns the type of depth-dependent projection onto object faces.
12434
12435 @rtype: L{DepthProjectionMode}
12436 @return: The current type of projection
12437 @see: L{setDepthProjectionMode()}
12438 """
12439 pass
12440
12442 """Returns the colorspace configuration for export of the projector.
12443
12444 @rtype: L{ColorspaceConfig}
12445 @return: The colorspace configuration for export.
12446 @see: L{setExportColorspaceConfig()}
12447 """
12448 pass
12449
12451 """This is emitted after the colorspace configuration for export is modified for the projector.
12452
12453 @type Config: L{ColorspaceConfig}
12454 @rtype: None
12455 """
12456 pass
12457
12459 """Returns the options passed to the file writer.
12460
12461 @rtype: variant
12462 @return: The options that are used in exporting images.
12463 @see: L{setExportOptions()}
12464 """
12465 pass
12466
12468 """Returns the file path to export the projection to.
12469
12470 @rtype: str
12471 @return: The file path that projection images are exported to
12472 @see: L{setExportPath()}
12473 """
12474 pass
12475
12484
12486 """Returns the frame offset of the projection.
12487
12488 @rtype: int
12489 @return: The frame offset of the projection
12490 @see: L{setFrameOffset()}
12491 """
12492 pass
12493
12495 """This is emitted when the frame offset is changed.
12496
12497 @type Offset: int
12498 @param Offset: The new frame offset
12499 @rtype: None
12500 """
12501 pass
12502
12504 """Returns the pixel height of the projection.
12505
12506 @rtype: int
12507 @return: The height in pixels of the projection
12508 """
12509 pass
12510
12512 """Returns the colorspace configuration for import of the projector.
12513
12514 @rtype: L{ColorspaceConfig}
12515 @return: The colorspace configuration for import.
12516 @see: L{setImportColorspaceConfig()}
12517 """
12518 pass
12519
12521 """This is emitted after the colorspace configuration for import is modified for the projector.
12522
12523 @type Config: L{ColorspaceConfig}
12524 @rtype: None
12525 """
12526 pass
12527
12529 """Sets the camera to the projector's view and imports the given image into the paint buffer.
12530
12531 If no path is provided, the current import path is used. Otherwise, this function sets the current import path to the one provided.
12532
12533 This function is similar to L{projectFromFile()}, but does not bake the loaded paint buffer.
12534
12535 @type Path: str
12536 @param Path: The file path to import the projection image from. If the path is empty, the current value of L{importPath()} is used.
12537 @rtype: None
12538 @raise IOError: Raised if the file from the updated image import path does not exist.
12539 @see: L{projectFromFile()}
12540 """
12541 pass
12542
12544 """Returns the file path to import the projection from.
12545
12546 @rtype: str
12547 @return: The file path to import projection images from
12548 @see: L{setImportPath()}
12549 """
12550 pass
12551
12553 """Returns the detail level of the lighting calculations.
12554
12555 @rtype: L{LightingMode}
12556 @return: The current lighting mode
12557 @see: L{setLightingMode()}
12558 """
12559 pass
12560
12562 """Changes the camera's settings to those of the projector.
12563
12564 @rtype: None
12565 @see: L{ProjectorManager.setCurrent()}
12566 """
12567 pass
12568
12570 """Returns the name of the projector.
12571
12572 @rtype: str
12573 @return: The name of the projector.
12574 @see: L{setName()}
12575 """
12576 pass
12577
12579 """This is emitted after the shader has been renamed.
12580
12581 @type NewName: str
12582 @param NewName: The new name of the shader
12583 @rtype: None
12584 """
12585 pass
12586
12588 """Returns the current paint compositing mode.
12589
12590 @rtype: str
12591 @return: The current painting mode as a string, such as 'Multiply' or 'Lighten'.
12592 @see: L{setPaintingMode()}
12593 """
12594 pass
12595
12597 """Imports an image and projects onto the geometry in the projector's view.
12598
12599 This reads an image from the current image import path into the paint buffer and bakes it.
12600
12601 @rtype: None
12602 @raise IOError: Raised if the file from the current image import path does not exist.
12603 @see: L{importPath()}, L{projectFromFile()}
12604 """
12605 pass
12606
12608 """Projects the given image file onto the geometry in the projector's view.
12609
12610 If no path is provided, the current import path is used. Otherwise, this is the equivalent of calling L{setImportPath()} and then L{project()}.
12611
12612 This function is similar to L{importFromFile()}, but also bakes the loaded paint buffer.
12613
12614 @type Path: str
12615 @param Path: The file path to import the projection image from, or an empty string to use the current value of L{importPath()}
12616 @rtype: None
12617 @raise IOError: Raised if the file from the updated image import path does not exist.
12618 @see: L{project()}, L{importFromFile()}
12619 """
12620 pass
12621
12623 """Returns the rotation of the projector's projection.
12624
12625 @rtype: float
12626 @see: L{setRotation()}
12627 """
12628 pass
12629
12630 - def save(self, FileName):
12631 """Save the projector data to a file.
12632
12633 @type FileName: str
12634 @param FileName: The absolute path, file name, and extension to save the projector data to.
12635 @rtype: None
12636 """
12637 pass
12638
12640 """Returns the scale of the projection.
12641
12642 @rtype: L{VectorN}
12643 @see: L{setScale()}
12644 """
12645 pass
12646
12648 """Sets the bit depth of the projector.
12649
12650 When unprojecting, the projector can render at varying bit depths. This method give control over the bit depth used.
12651
12652 @type Depth: L{BitDepth}
12653 @param Depth: The bit depth of the unprojection image. This should be suitable for the output image format - e.g. unprojecting to a PNG file with floating point bit depth will fail.
12654 @rtype: None
12655 @raise ValueError: Raised if the bit depth provided was invalid.
12656 @see: L{bitDepth()}
12657 """
12658 pass
12659
12661 """Sets the color clamping behavior of the projector.
12662
12663 @type ClampColors: bool
12664 @param ClampColors: True to clamp the colors to the 0..1 range, or False to not clamp
12665 @rtype: None
12666 @see: L{clampColors()}
12667 """
12668 pass
12669
12671 """Sets the type of depth-dependent projection onto object faces.
12672
12673 @type ProjectionMode: L{DepthProjectionMode}
12674 @param ProjectionMode: The new type of projection
12675 @rtype: None
12676 @see: L{depthProjectionMode()}
12677 """
12678 pass
12679
12681 """Sets the colorspace configuration for export of the channel.
12682
12683 @type Config: L{ColorspaceConfig}
12684 @param Config: The colorspace configuration for export.
12685 @rtype: None
12686 @raise ValueError: Raised if the colorspace configuration is invalid.
12687 @see: L{exportColorspaceConfig()}
12688 """
12689 pass
12690
12692 """Sets the options passed to the file writer.
12693
12694 These can be used to pass options to the file writer, in dictionary format. For example:
12695
12696 C{projector.setExportOptions({'Quality': 78.0, 'Scanline': True})}
12697
12698 @type Options: variant
12699 @param Options: The options that are used in exporting images.
12700 @rtype: None
12701 @see: L{exportOptions()}
12702 """
12703 pass
12704
12706 """Sets the path that the projector will export images to.
12707
12708 @type Path: str
12709 @param Path: The file path to export projection images to
12710 @rtype: None
12711 @see: L{exportPath()}
12712 """
12713 pass
12714
12724
12726 """Sets the frame offset, when using the imported path with the timeline.
12727
12728 @type Offset: int
12729 @param Offset: The frame offset from 0 to 9999
12730 @rtype: None
12731 @raise ValueError: Raised if the offset is out of range.
12732 @see: L{frameOffset()}
12733 """
12734 pass
12735
12737 """Sets the colorspace configuration for import of the projector.
12738
12739 @type Config: L{ColorspaceConfig}
12740 @param Config: The colorspace configuration for import.
12741 @rtype: None
12742 @raise ValueError: Raised if the colorspace configuration is invalid.
12743 @see: L{importColorspaceConfig()}
12744 """
12745 pass
12746
12748 """Sets the file path that the projector will import images from.
12749
12750 @type Path: str
12751 @param Path: The file path to import projection images from
12752 @rtype: None
12753 @see: L{importPath()}
12754 """
12755 pass
12756
12758 """Sets the detail level of the lighting calculations.
12759
12760 @type NewMode: L{LightingMode}
12761 @param NewMode: The new lighting mode
12762 @rtype: None
12763 @see: L{lightingMode()}
12764 """
12765 pass
12766
12768 """Sets the projector's name.
12769
12770 @type Name: str
12771 @rtype: None
12772 @raise ValueError: Raised if the name is empty, or if a projector with the given name already exists.
12773 @raise RuntimeError: Raised if no projector is open.
12774 @see: L{name()}
12775 """
12776 pass
12777
12779 """Sets the paint compositing mode of the projector.
12780
12781 @type PaintingMode: str
12782 @param PaintingMode: The new painting mode as a string, such as 'Multiply' or 'Lighten'. See the GUI for a full list of available painting modes.
12783 @rtype: None
12784 @raise ValueError: Raised if the specified mode is unknown.
12785 @see: L{paintingMode()}
12786 """
12787 pass
12788
12790 """Sets the rotation of the projector's projection
12791
12792 @type Rotation: float
12793 @rtype: None
12794 @raise ValueError: Throws a value error if the vector is not a 2D vector.
12795 @see: L{rotation()}
12796 """
12797 pass
12798
12800 """Sets the scale of the projection.
12801
12802 @type pScale: L{VectorN}
12803 @rtype: None
12804 @see: L{scale()}
12805 """
12806 pass
12807
12808 - def setSize(self, Width, Height):
12809 """Sets the projection size in pixels.
12810
12811 @type Width: int
12812 @type Height: int
12813 @rtype: None
12814 @raise ValueError: Raised if the requested size is not supported.
12815 """
12816 pass
12817
12819 """Sets the translation of the projector's projection
12820
12821 @type pTranslation: L{VectorN}
12822 @rtype: None
12823 @raise ValueError: Throws a value error if the vector is not a 2D vector.
12824 @see: L{translation()}
12825 """
12826 pass
12827
12829 """Sets the shader to use for unprojection.
12830
12831 @type UseShader: str
12832 @param UseShader: The name of the shader to use for unprojection.
12833 @rtype: None
12834 @raise ValueError: Raised if the specified shader is unknown.
12835 @see: L{useShader()}
12836 """
12837 pass
12838
12840 """Returns the translation of the projector's projection.
12841
12842 @rtype: L{VectorN}
12843 @see: L{setTranslation()}
12844 """
12845 pass
12846
12848 """Exports an image from the projector's view to the current export path.
12849
12850 @rtype: None
12851 @see: L{unprojectToFile()}, L{exportPath()}
12852 """
12853 pass
12854
12856 """Exports an image from the projector's view to the given file.
12857
12858 If no path is provided, the current export path is used. Otherwise, this is the equivalent of calling L{setExportPath()} and then L{unproject()}.
12859
12860 The I{options} parameter can be used to pass options to the file writer, in dictionary format. For example:
12861
12862 C{projector.unprojectToFile('/tmp/test.jpg', {'IntegerSetting': 1, 'StringSetting': 'Hello'})}
12863
12864 @type Path: str
12865 @param Path: The file path to export the projection image to, or an empty string to use the current value of L{exportPath()}
12866 @type Options: variant
12867 @param Options: This is an optional parameter which can be used to pass options to the file writer. See above for details.
12868 @rtype: None
12869 @see: L{unproject()}
12870 """
12871 pass
12872
12874 """Returns the name of the shader used for unprojection.
12875
12876 @rtype: str
12877 @return: The name of the shader used for unprojection.
12878 @see: L{setUseShader()}
12879 """
12880 pass
12881
12883 """Returns a list of shader names that can be used for unprojection.
12884
12885 @rtype: list of str
12886 @return: A list of shader names that can be used for unprojection.
12887 """
12888 pass
12889
12891 """Returns the pixel width of the projection.
12892
12893 @rtype: int
12894 @return: The width in pixels of the projection
12895 """
12896 pass
12897
12900 """Represents an group node.
12901
12902 A L{GroupNode} is a node that contains its own sub L{NodeGraph}. It can be used to organize nodes.
12903
12904 It is possible to promote parameters of the member nodes as parameters of L{GroupNode} itself. The promoted parameters are called knobs.
12905
12906 B{Example Code}
12907
12908 This example shows how to obtain a group node from the node graph of the current geo entity and print the names of the member nodes.
12909
12910 >>> import mari
12911 >>> nodeGraph = mari.geo.current().nodeGraph()
12912 >>> for node in nodeGraph.nodeList():
12913 ... if isinstance(node, mari.GroupNode) and not node.hasTag('_shader'):
12914 ... childNodeGraph = node.childNodeGraph()
12915 ... for memberNode in childNodeGraph.nodeList():
12916 ... nodeName = memberNode.nodeName()
12917
12918 This example shows how to create a group node and create a new node inside the group node.
12919
12920 >>> group = nodeGraph.createNode("Misc/Group")
12921 >>> subNodeGraph = group.childNodeGraph()
12922 >>> merge = subNodeGraph.createNode("Layer/Merge")
12923
12924 This example shows how to create a group node by passing in what nodes to group.
12925
12926 >>> mergeA = nodeGraph.createNode("Layer/Merge")
12927 >>> mergeB = nodeGraph.createNode("Layer/Merge")
12928 >>> group = nodeGraph.groupNodes([mergeA,mergeB]);
12929
12930 This example shows how create a knob in the group node
12931
12932 >>> group.createKnob("BAmount",mergeB,"Amount","B Amount")
12933
12934 This example shows how to create a gizmo and register it for reusing in a node graph.
12935
12936 >>> # Get the node graph of the current object
12937 >>> ng = mari.geo.current().nodeGraph()
12938 >>>
12939 >>> # Create UV node that outputs UV coordinates
12940 >>> uv = ng.createNode("Geometry/UV")
12941 >>>
12942 >>> # Create a cloud fractal noise node
12943 >>> cloud = ng.createNode("Procedural/Fractal/Cloud")
12944 >>>
12945 >>> # Connect UV to the position of cloud so that the cloud pattern is generated over UV space
12946 >>> cloud.setInputNode("Position",uv)
12947 >>>
12948 >>> # Group UV and cloud into a group node
12949 >>> group = ng.groupNodes([uv,cloud])
12950 >>>
12951 >>> # Create gizmo knobs, Size and Roughness
12952 >>> group.createKnob("CloudSize",cloud,"Size","Cloud Size")
12953 >>> group.createKnob("CloudRoughness",cloud,"Roughness","Cloud Roughness")
12954 >>>
12955 >>> # Save the group node out as an .mng file
12956 >>> ng.save("/tmp/UvCloud.mng",[group])
12957
12958 The saved group node can be automatically registered to appear in Mari by placing the file under Mari/Gizmos directory:
12959
12960 ~/Mari/Gizmos/Procedural/UVCloud.mng (On Mac and Linux)
12961
12962 C:\Users\<user_name>\My Documents\Mari\Gizmos\Procedural\UVCloud.mng (On Windows)
12963 """
12964
12966 """Returns the node graph this group node contains.
12967
12968 @rtype: L{NodeGraph}
12969 @return: The L{GroupNode} object this node contains.
12970 @raise RuntimeError: Raised if the child node graph cannot be found.
12971 """
12972 pass
12973
12974 - def createKnob(self, KnobName, TargetNode, TargetAttributeName, PrettyKnobName=""):
12975 """Creates a knob linked to a node attribute.
12976
12977 @type KnobName: str
12978 @param KnobName: name of the knob to create. It must contain only alphabets, numbers and underscores.
12979 @type TargetNode: L{Node}
12980 @param TargetNode: L{Node} object to link the new knob to
12981 @type TargetAttributeName: str
12982 @param TargetAttributeName: The attribute name of the L{TargetNode} to link the new knob to
12983 @type PrettyKnobName: str
12984 @param PrettyKnobName: The pretty name of the knob to be created
12985 @rtype: None
12986 @raise RuntimeError: Raised if the knob cannot be created.
12987 """
12988 pass
12989
12990 - def deleteKnob(self, KnobName, TargetNode, TargetAttributeName):
12991 """Deletes a knob linked to the node attribute.
12992
12993 @type KnobName: str
12994 @param KnobName: name of the knob
12995 @type TargetNode: L{Node}
12996 @param TargetNode: L{Node} object of the link to be deleted
12997 @type TargetAttributeName: str
12998 @param TargetAttributeName: The attribute name of the L{TargetNode} of the link to to be deleted
12999 @rtype: None
13000 @raise RuntimeError: Raised if the knob cannot be created.
13001 """
13002 pass
13003
13005 """Returns whether this node is an L{GroupNode}.
13006
13007 @rtype: bool
13008 @return: Whether this node is an L{GroupNode}
13009 """
13010 pass
13011
13013 """Renames a knob.
13014
13015 @type OldName: str
13016 @param OldName: the name of the knob to change
13017 @type NewName: str
13018 @param NewName: the new name of the knob
13019 @rtype: None
13020 """
13021 pass
13022
13025 """An object for creating lighting effects on a 3D mesh.
13026
13027 You can access lights through the L{LightManager} - for example: C{mari.lights.list()}
13028
13029 @cvar TYPE_NONE: No type set.
13030 @cvar TYPE_3D_CUBEMAP: Accutal cubemap from DDS or EXR filetype.
13031 @cvar TYPE_2D_LATLONG: Rectangluar image with spherical distortion, similar to a world Atlas image.
13032 @cvar TYPE_2D_CROSS: 4:3 or 3:4 ratio image with 6 square images in an cross shape
13033 @cvar TYPE_GUESS: Allows the best guess for the supplied image to be used.
13034 @cvar MODE_STATIC: Static Rotation.
13035 @cvar MODE_ROTATE: Animated Rotation.
13036 @group Signals: canvasBlurChanged, canvasDisplayChanged, cubeImageFilenameChanged, cubeImageResolutionChanged, cubeImageTypeChanged, cubeImageUpAxisChanged, fixedToChanged, intensityChanged, rotationUpChanged, rotationUpModeChanged, rotationUpSpeedChanged
13037 """
13038
13045
13046 TYPE_NONE = 0
13047 TYPE_3D_CUBEMAP = 1
13048 TYPE_2D_LATLONG = 2
13049 TYPE_2D_CROSS = 3
13050 TYPE_GUESS = 4
13051
13056
13057 AXIS_UP_X = 0
13058 AXIS_UP_Y = 1
13059 AXIS_UP_Z = 2
13060
13064
13065 MODE_STATIC = 0
13066 MODE_ROTATE = 1
13067
13069 """Return the blur for this environment light canvas display.
13070
13071 @rtype: float
13072 @return: The blur value
13073 @see: L{setCanvasBlur()}
13074 """
13075 pass
13076
13078 """Emitted when canvasBlur changes.
13079
13080 @type Blur: float
13081 @param Blur: The new value
13082 @rtype: None
13083 """
13084 pass
13085
13087 """Return the enabled state for this environment light canvas display.
13088
13089 @rtype: bool
13090 @return: The enabled state value
13091 @see: L{setCanvasDisplay()}
13092 """
13093 pass
13094
13096 """Emitted when canvasDisplay changes.
13097
13098 @type Display: bool
13099 @param Display: The new value
13100 @rtype: None
13101 """
13102 pass
13103
13105 """Clear out the internally cached cubeImage data.
13106
13107 @rtype: None
13108 """
13109 pass
13110
13112 """Clear out the internally cached environment data.
13113
13114 @rtype: None
13115 """
13116 pass
13117
13119 """Returns the image manager image used to produce the environment light.
13120
13121 Some image types cannot be stored in the image manager (i.e. DDS cubemaps). These types of files will return None as there is no image manager entry for them. In these cases use L{cubeImageFilename()} instead
13122
13123 @rtype: L{Image}
13124 @return: The image manager image
13125 @see: L{cubeImageFilename()}, L{setCubeImage()}
13126 """
13127 pass
13128
13130 """Returns the filename of the image used as to produce the environment light.
13131
13132 @rtype: str
13133 @return: The filename of the image
13134 """
13135 pass
13136
13138 """Emitted when cubeImageFilename changes.
13139
13140 @type Filename: str
13141 @param Filename: The new value
13142 @rtype: None
13143 """
13144 pass
13145
13147 """Returns the cube image resolution.
13148
13149 This resolution is used for all X, Y and Z sides of the cubemap.
13150
13151 @rtype: int
13152 @return: The image up resolution
13153 @see: L{setCubeImageResolution()}
13154 """
13155 pass
13156
13158 """Emitted when cubeImageResolution changes.
13159
13160 @type Resolution: int
13161 @param Resolution: The new value
13162 @rtype: None
13163 """
13164 pass
13165
13167 """Returns the present method used to convert the image into a cubemap.
13168
13169 @rtype: L{CubeImageType}
13170 @return: The cube image conversion type
13171 @see: L{setCubeImageType()}
13172 """
13173 pass
13174
13176 """Emitted when cubeImageType changes.
13177
13178 @type Type: int
13179 @param Type: The new value
13180 @rtype: None
13181 """
13182 pass
13183
13185 """Returns the image axis that is treated as 'up'.
13186
13187 @rtype: L{ImageUpAxis}
13188 @return: The image up axis
13189 @see: L{setCubeImageUpAxis()}
13190 """
13191 pass
13192
13194 """Emitted when cubeImageUpAxis changes.
13195
13196 @type Axis: int
13197 @param Axis: The new value
13198 @rtype: None
13199 """
13200 pass
13201
13203 """Returns the type of object that the light is fixed to.
13204
13205 Lights can be fixed to either the world or the camera. This allows lights to follow the view, ensuring models are illuminated at all times.
13206
13207 @rtype: L{FixedTo}
13208 @return: L{Light.SCENE} if the light is fixed to the scene, or L{Light.CAMERA} if fixed to the camera.
13209 @see: L{setFixedTo()}
13210 """
13211 pass
13212
13214 """Emitted when fixedTo changes.
13215
13216 @type Type: int
13217 @param Type: The new value
13218 @rtype: None
13219 """
13220 pass
13221
13223 """Return the intensity value for this environment light.
13224
13225 @rtype: float
13226 @return: The intensity value
13227 @see: L{setIntensity()}
13228 """
13229 pass
13230
13232 """Emitted when intensity changes.
13233
13234 @type Intensity: float
13235 @param Intensity: The new value
13236 @rtype: None
13237 """
13238 pass
13239
13241 """Print out the internal environment light cache keys return Cache keys.
13242
13243 @rtype: list of str
13244 """
13245 pass
13246
13248 """Return the rotation angle for this environment light.
13249
13250 @rtype: float
13251 @return: The rotation angle
13252 @see: L{setRotationUp()}
13253 """
13254 pass
13255
13257 """Emitted when rotationUp changes.
13258
13259 @type Rotation: float
13260 @param Rotation: The new value
13261 @rtype: None
13262 """
13263 pass
13264
13266 """Return the rotation mode for this environment light.
13267
13268 @rtype: L{RotationMode}
13269 @return: The rotation mode
13270 @see: L{setRotationUpMode()}
13271 """
13272 pass
13273
13275 """Emitted when rotationUpMode changes.
13276
13277 @type Mode: int
13278 @param Mode: The new value
13279 @rtype: None
13280 """
13281 pass
13282
13284 """Return the rotation speed for this environment light.
13285
13286 @rtype: float
13287 @return: The rotation speed, in rotations per second
13288 @see: L{setRotationUpSpeed()}
13289 """
13290 pass
13291
13293 """Emitted when rotationUpSpeed changes.
13294
13295 @type Speed: float
13296 @param Speed: The new value
13297 @rtype: None
13298 """
13299 pass
13300
13302 """Set the blur for the environment light canvas dislay.
13303
13304 @type Blur: float
13305 @param Blur: The new blur for the environment light canvas display
13306 @rtype: None
13307 @see: L{canvasBlur()}
13308 """
13309 pass
13310
13312 """Set the enable for the environment light canvas dislay.
13313
13314 @type Display: bool
13315 @param Display: The enable state for the environment light canvas display
13316 @rtype: None
13317 @see: L{canvasDisplay()}
13318 """
13319 pass
13320
13322 """Sets the image and how to convert it to a cubemap.
13323
13324 @type rImage: variant
13325 @param rImage: Value to set image as. Can be a L{Image} or a string file path
13326 @type Type: L{CubeImageType}
13327 @param Type: How to convert the image into the cubemap image. Use TYPE_GUESS to allow auto detection to be used
13328 @rtype: None
13329 @raise ValueError: Raised if the rImage is empty, of an unsupported type or contains an invalid entry.
13330 @see: L{cubeImage()}
13331 """
13332 pass
13333
13335 """Sets the cube image resolution.
13336
13337 @type Resolution: int
13338 @param Resolution: The cube image size used for all X, Y and Z sides of the cubemap.
13339 @rtype: None
13340 @raise ValueError: Raise if resolution is invalid
13341 @see: L{cubeImageResolution()}
13342 """
13343 pass
13344
13346 """Sets the image conversion type.
13347
13348 @type Type: L{CubeImageType}
13349 @param Type: How to convert the image into the cubemap image. This metyhod cannot accept the TYPE_GUESS value, use L{setCubeImage()}
13350 @rtype: None
13351 @raise ValueError: Raised if the TYPE_GUESS value is used.
13352 @see: L{setCubeImage()}, L{cubeImageType()}
13353 """
13354 pass
13355
13357 """Sets the image axis that is treated as 'up'.
13358
13359 @type Axis: L{ImageUpAxis}
13360 @param Axis: The image axis to treat up
13361 @rtype: None
13362 @raise ValueError: Raise if the axis is invalid
13363 @see: L{cubeImageUpAxis()}
13364 """
13365 pass
13366
13368 """Sets the type of object that the light should be fixed to.
13369
13370 @type TargetType: L{FixedTo}
13371 @param TargetType: L{Light.SCENE} if the light is to be fixed to the scene, or L{Light.CAMERA} if fixed to the camera.
13372 @rtype: None
13373 @see: L{fixedTo()}
13374 """
13375 pass
13376
13378 """Set the intensity for the environment light.
13379
13380 @type Intensity: float
13381 @param Intensity: The new L{Intensity} for the environment light
13382 @rtype: None
13383 @see: L{intensity()}
13384 """
13385 pass
13386
13388 """Set the rotation about the up direction for the environment light.
13389
13390 @type Angle: float
13391 @param Angle: The new angle for the environment light rotation, in degrees
13392 @rtype: None
13393 @see: L{rotationUp()}
13394 """
13395 pass
13396
13398 """Set the rotation mode for the environment light.
13399
13400 @type Mode: L{RotationMode}
13401 @param Mode: The new rotation mode for the environment light
13402 @rtype: None
13403 @see: L{rotationUpMode()}
13404 """
13405 pass
13406
13408 """Set the rotation speed about the up direction for the environment light.
13409
13410 @type Speed: float
13411 @param Speed: The new speed for the environment light rotation, in rotations per second
13412 @rtype: None
13413 @see: L{rotationUpSpeed()}
13414 """
13415 pass
13416
13419 """Provides access to an individual version of a geometry entity.
13420
13421 Mari allows objects to have multiple versions. These versions should be uniquely named.
13422
13423 You can access a geometry entity version through a L{GeoEntity} - for example: C{mari.geo.current().versionList()}
13424
13425 B{Example Code}
13426
13427 C{# This examples obtains the current version of current geometry object}
13428
13429 C{import mari}
13430
13431 C{currentObjectVersion = mari.geo.current().currentVersion()}
13432
13433 @group Signals: aboutToLoad, createdChanged, creatorChanged, loaded, modifiedChanged, nameChanged, pathChanged
13434 """
13435
13437 """This is emitted just before the data for the version is loaded.
13438
13439 @rtype: None
13440 """
13441 pass
13442
13444 """Returns the date and time that the source file for the version was created.
13445
13446 @rtype: QDateTime
13447 @return: The date and time that the source file for this version was created
13448 @see: L{setCreated()}
13449 """
13450 pass
13451
13453 """This is emitted when the created date details change for the version.
13454
13455 @type NewCreated: QDateTime
13456 @param NewCreated: The new date for the created field
13457 @rtype: None
13458 """
13459 pass
13460
13462 """Returns information about the creator of the version.
13463
13464 This can be the creator's name, or any other desired information.
13465
13466 @rtype: str
13467 @return: Information about the creator of the version
13468 @see: L{setCreator()}
13469 """
13470 pass
13471
13473 """This is emitted when the creator details change for the version.
13474
13475 @type NewCreator: str
13476 @param NewCreator: The new creator details
13477 @rtype: None
13478 """
13479 pass
13480
13482 """Returns the count of geometries that are contained within a version.
13483
13484 When geometries are merged together, they could either exist as a single geometry (if the merge type is set to be SINGLE_MESH) or still as several ones (in the case of JUST_MERGE_NODES). In any case, this is managed internally by Mari and the user doens't have access to that information; this funciton returns the count of geometries that were merged together.
13485
13486 @rtype: int
13487 @return: Count of geometries contained in a version
13488 """
13489 pass
13490
13492 """Loads the version from file.
13493
13494 The file path should be set using L{setPath()} before calling this method. Any settings required for loading should also be provided beforehand using L{setSettingsString()}.
13495
13496 If the version is already loaded, this will clear it and reload from the file.
13497
13498 @rtype: bool
13499 @return: True if the version was loaded correctly, or False otherwise.
13500 """
13501 pass
13502
13504 """This is emitted after the data for the version has been loaded.
13505
13506 @rtype: None
13507 """
13508 pass
13509
13511 """Returns the paths used to create the version, when there are multiple mesh source files.
13512
13513 @rtype: list of str
13514 @return: The file paths that the version was loaded from
13515 @see: L{setMeshPaths()}
13516 """
13517 pass
13518
13520 """Returns the last modified date and time of the source file for the version.
13521
13522 @rtype: QDateTime
13523 @return: The date and time that the source file for this version was last modified
13524 @see: L{setModified()}
13525 """
13526 pass
13527
13529 """This is emitted when the modified date changes for the version.
13530
13531 @type NewModified: QDateTime
13532 @rtype: None
13533 """
13534 pass
13535
13537 """Returns the name of the version.
13538
13539 @rtype: str
13540 @return: The name of the version
13541 @see: L{setName()}
13542 """
13543 pass
13544
13546 """This is emitted when the name of the version is changed.
13547
13548 @type NewName: str
13549 @param NewName: The new name of the version
13550 @rtype: None
13551 """
13552 pass
13553
13555 """Returns a list of the different valid UV patches that make up this GeoEntityVesion.
13556
13557 Geometry may be broken into GeoVersions with multiple UV patches. Each UV patch occupies a single integer square in UV space. Each patch may have a name, associated metadata, and locked or hidden or valid status.
13558
13559 Note however that these indices do not necessarily map directly to UDIMs, as some UDIMs may be unused, and there will not be any corresponding spaces left empty in the array. To be sure of the UDIM of a patch, call the L{GeoPatch.udim()} method.
13560
13561 @rtype: list of L{GeoPatch}
13562 @return: A list of the UV patch objects associated with this geometry version
13563 @note: This method returns the list of patches from this L{GeoEntityVersion}. See L{GeoEntity.patchList()}
13564 """
13565 pass
13566
13568 """Returns the path used to create the version.
13569
13570 @rtype: str
13571 @return: The file path that the version was loaded from
13572 @see: L{setPath()}
13573 """
13574 pass
13575
13577 """This is emitted when the path changes for the version.
13578
13579 @type NewPath: str
13580 @param NewPath: The new path for the version
13581 @rtype: None
13582 """
13583 pass
13584
13586 """Sets the file creation date and time for this version.
13587
13588 @type CreatedDate: QDateTime
13589 @param CreatedDate: The date and time that the source file for the version was created
13590 @rtype: None
13591 @see: L{created()}
13592 """
13593 pass
13594
13596 """Sets the name of the creator of the version.
13597
13598 This can be the creator's name, or any other desired information.
13599
13600 @type Creator: str
13601 @param Creator: Information about the creator of the version
13602 @rtype: None
13603 @see: L{creator()}
13604 """
13605 pass
13606
13608 """Sets the file paths for this version, when there are multiple mesh source files.
13609
13610 @type Paths: list of str
13611 @param Paths: The paths that this version should be loaded from
13612 @rtype: None
13613 @see: L{meshPaths()}
13614 """
13615 pass
13616
13618 """Sets the last modified date and time for the source file for the version.
13619
13620 @type ModifiedDate: QDateTime
13621 @param ModifiedDate: The date and time that the source file for this version was last modified
13622 @rtype: None
13623 @see: L{modified()}
13624 """
13625 pass
13626
13628 """Sets the name for the version.
13629
13630 @type NewName: str
13631 @param NewName: The new name for the version
13632 @rtype: None
13633 @raise ValueError: Raised if the version name is not unique (i.e. if the parent L{GeoEntity} already has a version with the specified name)
13634 @see: L{name()}
13635 """
13636 pass
13637
13639 """Sets the file path for this version.
13640
13641 @type Path: str
13642 @param Path: The path that this version should be loaded from
13643 @rtype: None
13644 @see: L{path()}
13645 """
13646 pass
13647
13649 """Sets the settings used to load the version.
13650
13651 These are passed into the geometry loader.
13652
13653 @type NewSettings: variant
13654 @param NewSettings: A dictionary that maps string setting names to string setting values
13655 @rtype: None
13656 @see: L{settings()}
13657 """
13658 pass
13659
13661 """Sets the settings used to load the version.
13662
13663 These are passed into the geometry loader.
13664
13665 The string should be a list of name-value pairs collapsed into a single string. The pairs should be of the form "name=value", with each pair separated by "|" - for example: "setting1=5|setting2=8"
13666
13667 This format can be produced from a Python dictionary using code such as the following:
13668
13669 C{"|".join([str(key) + "=" + str(value) for (key, value) in settings_dict.iteritems()])}
13670
13671 @type SettingsString: str
13672 @param SettingsString: A list of name-value pairs collapsed into a single string.
13673 @rtype: None
13674 @see: L{settingsString()}, L{settings()}
13675 """
13676 pass
13677
13679 """Returns the settings used to create the version.
13680
13681 These settings can control things like SUB-D level, proxy creation, etc. The values accepted by geometry loaders are different for each loader.
13682
13683 @rtype: variant
13684 @return: A map of name-value pairs that are passed into the geometry loader when loading the version.
13685 @see: L{setSettings()}
13686 """
13687 pass
13688
13690 """Returns the settings used to create the version as a string.
13691
13692 @rtype: str
13693 @return: The settings for this version as a string. This is a list of name-value pairs collapsed into a single string, as described in L{setSettingsString()}.
13694 @see: L{settings()}, L{setSettingsString()}
13695 """
13696 pass
13697
13700 """This API provides functionality for objects that expose a number of built in properties.
13701
13702 Objects within Mari can have two forms of properties, built in values or metadata. Built in properties are hard coded onto objects and cannot be removed or their characteristics modified. This API provides generic functionality for objects that expose these built in properties for scripting.
13703
13704 C{def PrintPropertyInfo(Obj):}
13705
13706 C{for Property in Obj.propertiesList():}
13707
13708 C{print Property, "=", Obj.getProperty(Property)}
13709
13710 C{print " Display Name :", Obj.propertyDisplayName(Property)}
13711
13712 C{print " Can reset :", Obj.canResetProperty(Property)}
13713
13714 C{print " Is Enum :", Obj.propertyIsEnum(Property)}
13715
13716 C{if Obj.propertyIsEnum(Property) == True:}
13717
13718 C{for value in Obj.propertyEnumValues(Property):}
13719
13720 C{print " :" , value}
13721
13722 C{print " Has MinMax :", Obj.propertyHasMinMax(Property)}
13723
13724 C{print " Is Read Only :", Obj.propertyIsReadOnly(Property)}
13725
13726 C{print " Tooltip :", Obj.propertyTooltip(Property)}
13727
13728 C{if Obj.propertyHasMinMax(Property)==True:}
13729
13730 C{print " MinMax Values:", Obj.propertyMinMax(Property)}
13731
13732 Properties on an object are refered to by a path normally of the form subobject/group/property Subobjects are separate sub-components of an object that expose properties through the main object . Proprties can be get/set/reset, and you can query various attributes of the property such as min and max values and the tooltip if one is provided.
13733
13734 @warning: The Property API should be considered to be a "low level" API and only used when the objects implementing it don't expose the required functionality in another way. An example of this might be an object that has a property "size" and the methods getSize() and setSize(). In this instance the API methods should be used rather than the getProperty or setProperty methods. Properties exposed by this API may move, be renamed or removed entirely in future Mari releases. We will endevor to keep properties backwards compatible but they may change without warning or deprecation. Users of this API should also be aware that modifying properties via this interface can lead to unexpected side effects and may cause Mari to enter a unwanted state. All properties exposed by an object are accessible via this interface and that may include properties that are normally reserved for internal use only. You have been warned. :)
13735 """
13736
13738 """Query if a given property can be automatically reset to a default value.
13739
13740 C{print mari.tools.currentTool().canResetProperty( mari.tools.currentTool().propertiesList()[0])}
13741
13742 @type PropertyName: str
13743 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13744 @rtype: bool
13745 @raise ValueError: Raised if the given property is not found on this object
13746 """
13747 pass
13748
13750 """Return the value of a given property.
13751
13752 C{print mari.tools.currentTool().getProperty( mari.tools.currentTool().propertiesList()[0])}
13753
13754 @type PropertyName: str
13755 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13756 @rtype: variant
13757 @raise ValueError: Raised if the given property is not found on this object
13758 """
13759 pass
13760
13762 """Return the list of properties that can be set on this object.
13763
13764 C{print mari.tools.currentTools().propertiesList( )}
13765
13766 @rtype: list of str
13767 @return: a list of strings. Each entry is the full name of a property that can be set on this object
13768 """
13769 pass
13770
13772 """Return the display name of a given property, this is the name that should be presented to the user.
13773
13774 C{print mari.tools.currentTool().propertyDisplayName( mari.tools.currentTool().propertiesList()[0])}
13775
13776 @type PropertyName: str
13777 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13778 @rtype: str
13779 @raise ValueError: Raised if the given property is not found on this object
13780 """
13781 pass
13782
13784 """Return the valid values for an enum type property.
13785
13786 C{print mari.tools.currentTool().propertyEnumValues( mari.tools.currentTool().propertiesList()[0])}
13787
13788 @type PropertyName: str
13789 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13790 @rtype: list of str
13791 @raise ValueError: Raised if the given property is not found on this object
13792 @raise ValueError: Raised if the given property is not an enum type property
13793 """
13794 pass
13795
13797 """Query if a given property has defined min and max values.
13798
13799 C{print mari.tools.currentTool().propertyHasMinxMax( mari.tools.currentTool().propertiesList()[0])}
13800
13801 @type PropertyName: str
13802 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13803 @rtype: bool
13804 @raise ValueError: Raised if the given property is not found on this object
13805 """
13806 pass
13807
13809 """Query if a given property is an enumerated type.
13810
13811 C{print mari.tools.currentTool().propertyIsEnum( mari.tools.currentTool().propertiesList()[0])}
13812
13813 @type PropertyName: str
13814 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13815 @rtype: bool
13816 @raise ValueError: Raised if the given property is not found on this object
13817 """
13818 pass
13819
13821 """Query if a given property is read only.
13822
13823 C{print mari.tools.currentTool().propertyIsReadOnly( mari.tools.currentTool().propertiesList()[0])}
13824
13825 @type PropertyName: str
13826 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13827 @rtype: bool
13828 @raise ValueError: Raised if the given property is not found on this object
13829 """
13830 pass
13831
13833 """Query the min and max values for a given property.
13834
13835 C{print mari.tools.currentTool().propertyMinMax( mari.tools.currentTool().propertiesList()[0])}
13836
13837 @type PropertyName: str
13838 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13839 @rtype: list of variant
13840 @raise ValueError: Raised if the given property is not found on this object
13841 @raise ValueError: Raised if the given property does not proviude min max values
13842 """
13843 pass
13844
13856
13858 """Reset the given property to the default value, if the given property cannot be reset this method will simply return without error.
13859
13860 C{mari.tools.currentTool().resetProperty( mari.tools.currentTool().propertiesList()[0])}
13861
13862 @type PropertyName: str
13863 @param PropertyName: The name of the property to query, this should be found in the list returned by L{propertiesList()}
13864 @rtype: None
13865 @raise ValueError: Raised if the given property is not found on this object
13866 """
13867 pass
13868
13870 """Set the value of a given property.
13871
13872 C{mari.tools.currentTool().setProperty( mari.tools.currentTool().propertiesList()[0],2.0)}
13873
13874 @type PropertyName: str
13875 @param PropertyName: The name of the property to set, this should be found in the list returned by L{propertiesList()}
13876 @type NewValue: variant
13877 @param NewValue: The new value for the property
13878 @rtype: None
13879 @raise ValueError: Raised if the given property is not found on this object or the value passed is incompatible
13880 @raise ValueError: Raised if the property is read only
13881 @raise eInternal: Raised if some other problem was encountered when setting the property
13882 """
13883 pass
13884
13885
13886 -class Shelf(Metadata):
13887 """A shelf is a place where the user can bookmark objects such as brushes, images, and colors.
13888
13889 B{Example Code}
13890
13891 >>> # This example shows how to obtain the "Personal" shelf
13892 >>> import mari
13893 >>> personal_shelf = mari.shelves.find("Personal")
13894 >>> print personal_shelf.className()
13895 Shelf
13896 """
13897
13898 - def exportTo(self, DirectoryPath, GenerateCatalog):
13899 """Exports the shelf to the folder specified as a set of XML and image files.
13900
13901 All resources will be localized into the location.
13902
13903 @type DirectoryPath: str
13904 @param DirectoryPath: The path to the directory the shelf should be exported to
13905 @type GenerateCatalog: bool
13906 @param GenerateCatalog: Indicates whether to generate a catalog for the shelf
13907 @rtype: None
13908 @raise IOError: Raised if the export failed.
13909 """
13910 pass
13911
13913 """Returns the name of the shelf.
13914
13915 @rtype: str
13916 @return: The name of the shelf
13917 @see: L{setName()}
13918 """
13919 pass
13920
13921 - def saveAs(self, rFileName):
13922 """Saves the shelf to the given file name.
13923
13924 @type rFileName: str
13925 @param rFileName: The file name to save the shelf to
13926 @rtype: None
13927 @raise RuntimeError: Raised if the save failed.
13928 """
13929 pass
13930
13932 """Sets the name of the shelf.
13933
13934 @type NewName: str
13935 @param NewName: The new name for the shelf
13936 @rtype: None
13937 @see: L{name()}
13938 """
13939 pass
13940
13943 """Provides an interface to objects within Mari that are lockable and hidable.
13944
13945 This includes methods for settings and getting the visible and locked status and signals to indicate when these states are changed.
13946
13947 B{Example Code}
13948
13949 >>> # This examples obtains the patch with UDIM 1001 of current geometry object, and locks it
13950 >>> import mari
13951 >>> patch_1001 = mari.geo.current().patch(0)
13952 >>> patch_1001.lock()
13953
13954 @group Signals: lockedChanged, visibilityChanged
13955 """
13956
13958 """Hides the object from view.
13959
13960 @rtype: None
13961 @see: L{show()}, L{setVisibility()}, L{isVisible()}
13962 """
13963 pass
13964
13966 """Indicates whether this object is locked, and if so, unmodifiable.
13967
13968 @rtype: bool
13969 @return: True if this image is locked, or False if unlocked
13970 @see: L{lock()}, L{unlock()}, L{setLocked()}
13971 """
13972 pass
13973
13975 """Indicates whether this object is visible.
13976
13977 @rtype: bool
13978 @return: True if the object is visible, or False if not.
13979 @see: L{show()}, L{setVisibility()}, L{hide()}
13980 """
13981 pass
13982
13984 """Locks the object to prevent modifications.
13985
13986 @rtype: None
13987 @see: L{isLocked()}, L{setLocked()}, L{unlock()}
13988 """
13989 pass
13990
13992 """This is emitted after the object is locked or unlocked.
13993
13994 @type Locked: bool
13995 @param Locked: True if the object is now locked, or False otherwise
13996 @rtype: None
13997 """
13998 pass
13999
14001 """Locks or unlocks the object, to optionally prevent modifications.
14002
14003 @type Locked: bool
14004 @rtype: None
14005 @see: L{isLocked()}, L{lock()}, L{unlock()}
14006 """
14007 pass
14008
14010 """Shows or hides the object.
14011
14012 @type Visible: bool
14013 @param Visible: True to show the object, or False to hide it.
14014 @rtype: None
14015 @see: L{show()}, L{isVisible()}, L{hide()}
14016 """
14017 pass
14018
14020 """Shows the object again after a previous L{hide()} operation.
14021
14022 @rtype: None
14023 @see: L{setVisibility()}, L{isVisible()}, L{hide()}
14024 """
14025 pass
14026
14028 """Unlocks the object and allows modifications.
14029
14030 @rtype: None
14031 @see: L{isLocked()}, L{lock()}, L{setLocked()}
14032 """
14033 pass
14034
14036 """This is emitted after the object is shown or hidden.
14037
14038 @type Visible: bool
14039 @param Visible: True if this object is now visible, or False otherwise
14040 @rtype: None
14041 """
14042 pass
14043
14046 """Holds preview information about an available project.
14047
14048 These objects provide summary information about the projects that are available in the user's cache directory.
14049
14050 You can set metadata on L{ProjectInfo} objects to be accessed at any time, including when the project is closed. This data will persist automatically, without the need for an explicit save. You can also add metadata items to the tool tip text displayed when the user hovers their mouse over the project icon.
14051
14052 You can access project information through the L{ProjectManager} - for example: C{mari.projects.list()}
14053
14054 B{Example Code}
14055
14056 >>> # This example shows how to print the list of names of existing projects to the application log
14057 >>> import mari
14058 >>> for project_info in mari.projects.list():
14059 ... mari.app.log(project_info.name())
14060 """
14061
14078
14080 """Returns the autosave path.
14081
14082 @rtype: str
14083 """
14084 pass
14085
14087 """Return the disk cache usage of this project in bytes.
14088
14089 If this returns 0 the cache usage may not have been calculated on this project. Older projects may be in this state.
14090
14091 @rtype: qint64
14092 @raise RuntimeError: If the size has not been calculated for this project yet. Old projects may not have this value calculated. Loading and re-saving the project will solve this problem.
14093 """
14094 pass
14095
14096 - def close(self, ConfirmIfModified=True):
14097 """Closes the project.
14098
14099 @type ConfirmIfModified: bool
14100 @param ConfirmIfModified: If True (the default), a confirmation dialog is displayed if the project has been modified.
14101 @rtype: None
14102 @raise RuntimeError: Raised if the project is already closed.
14103 """
14104 pass
14105
14107 """Returns the time and date that the project was created.
14108
14109 @rtype: QDateTime
14110 """
14111 pass
14112
14114 """Returns if the porjected is enabled, i.e.
14115
14116 can be opened, or not. If the project is enabled it is available to open in the GUI. If disabled, the project is greyed out and unavailable to open through the GUI. The project may still be opened using L{open()}.
14117
14118 @rtype: bool
14119 @return: True is enabled, False if disabled.
14120 """
14121 pass
14122
14124 """Return True if this project was created using Mari Minion.
14125
14126 @rtype: bool
14127 @return: True if Mari Minion was used to create this project, False otherwise
14128 """
14129 pass
14130
14132 """Returns True if this is a null record, and the project is invalid.
14133
14134 @rtype: bool
14135 """
14136 pass
14137
14139 """Returns True if the project is open, or False otherwise.
14140
14141 @rtype: bool
14142 """
14143 pass
14144
14146 """Returns the time and date of the last modification to the project.
14147
14148 @rtype: QDateTime
14149 """
14150 pass
14151
14153 """Returns the path to the model file used in the project.
14154
14155 For projects that contain multiple models, this will return the currently selected one.
14156
14157 For models with multiple versions, the currently selected version will be used.
14158
14159 @rtype: str
14160 @see: L{modelPathList()}
14161 """
14162 pass
14163
14165 """Returns the paths to all model files used in the project.
14166
14167 For models with multiple versions, the currently selected version will be used.
14168
14169 @rtype: list of str
14170 @see: L{modelPath()}
14171 """
14172 pass
14173
14175 """Returns the name of the project.
14176
14177 @rtype: str
14178 """
14179 pass
14180
14182 """Returns the number of channels in the project.
14183
14184 @rtype: int
14185 @deprecated: This function always returns zero, and so is of no use. It will be removed in a future version.
14186 """
14187 pass
14188
14190 """Opens the project.
14191
14192 @rtype: L{Project}
14193 @return: The newly opened project.
14194 @raise IOError: Raised if the project was found, but there was an error opening it.
14195 @raise RuntimeError: Raised if there was already a project open, since only one can be open at a time.
14196 """
14197 pass
14198
14200 """Returns the directory for the project.
14201
14202 @rtype: list of str
14203 """
14204 pass
14205
14207 """Returns the project path.
14208
14209 @rtype: str
14210 """
14211 pass
14212
14214 """Returns the index of the project in the list of recently opened projects.
14215
14216 @rtype: int
14217 @return: The index of the project in the recent projects list, starting from 0 for the first. If the project is not in the list, the result will be -1.
14218 """
14219 pass
14220
14237
14239 """Sets the project to enabled or disabled.
14240
14241 @type Enabled: bool
14242 @param Enabled: If True, the project will be available to open in the GUI. If False, the project will not be available to be open in the GUI. The project may still be opened using L{open()}.
14243 @rtype: None
14244 """
14245 pass
14246
14248 """Returns the subcache path for the project.
14249
14250 @rtype: str
14251 """
14252 pass
14253
14255 """Returns the UUID of the project.
14256
14257 @rtype: str
14258 """
14259 pass
14260
14262 """Returns the version of Mari that the project was saved in.
14263
14264 This will include only major and minor version numbers, so for example both 1.3v1 and 1.3v2 will be shown as 1.3.
14265
14266 In some cases, such as for older projects without version information, this may be a string such as "Unknown".
14267
14268 @rtype: str
14269 @return: The version of Mari that the project was saved in
14270 """
14271 pass
14272
14273 - def versionHistory(self):
14274 """Returns the history of Mari versions the project has been saved in.
14275
14276 @rtype: str
14277 @return: A list of the Mari version numbers that the project has been saved in, starting with the one in which it was saved. Some data may be missing from projects created or saved in Mari versions that do not support this functionality.
14278 """
14279 pass
14280
14283 """Abstract class for implementing a custom L{ImageProtocolHandler}.
14284
14285 An L{ImageProtocolHandler} subclass allows translating an URL with custom protocol into actual image path. Once a subclass of L{ImageProtocolHandler} is registered with its associated protocol, L{ImageManager} will start redirecting incoming URL to the protocol handler for the protocol. Then the handler translates URL into an actual image path so that L{ImageManager} can open the image. A typical use case is to integrate a in-house image library into MARI for straight drag&drop of image
14286
14287 B{Example Code}
14288
14289 >>> # This examples implements a new sample ImageProtocolHandler that removes the protocol scheme and adds .jpg as extension
14290 >>> class MyImageProtocolHandler(mari.ImageProtocolHandler):
14291 >>> def load(self,location):
14292 >>> return PySide.QtCore.QUrl(location).toString(PySide.QtCore.QUrl.RemoveScheme)+".jpg"
14293 >>> my_protocol_handler = MyImageProtocolHandler()
14294 >>> mari.images.registerProtocolHandler("myjpgprotocol",my_protocol_handler)
14295 """
14296
14297 - def load(self, Location):
14298 """The actual logic to handle translation of the given URL location to actual file path.
14299
14300 @type Location: str
14301 @param Location: the URL location passed for translation
14302 @rtype: str
14303 @return: the string representing the actual file path after translating the URL
14304 """
14305 pass
14306
14307
14308 -class Project(PropertySource):
14309 """Provides access to a currently open project.
14310
14311 A project stores information about a currently open user session. It contains the geometry textures, reference images, and all associated user settings. This object provides basic access to the project.
14312
14313 Data for the project is stored in Mari's internal caching system. To export the project fully the user may archive it.
14314
14315 Projects can be accessed through the L{ProjectManager} - for example: C{mari.projects.current()}
14316
14317 Note that it is not possible to obtain a L{Project} object for a project that is not currently open. To obtain information about an available unopened project, get a L{ProjectInfo} object using a function call like the following: C{mari.projects.find('blacksmith')}
14318
14319 B{Example Code}
14320
14321 >>> # This example shows how to obtain the Project object representing the current project
14322 >>> import mari
14323 >>> project = mari.projects.current()
14324 >>> print project.className()
14325 Project
14326
14327 @cvar LIGHTING_FLAT: A flat, uniform, directionless light.
14328 @cvar LIGHTING_BASIC: Basic lighting from above, front.
14329 @cvar LIGHTING_FULL: User-controllable lighting.
14330 @group Signals: closing, colorspaceDefaultsChanged, saved
14331 """
14332
14334 """Options for lighting the main model.
14335 @cvar LIGHTING_FLAT: A flat, uniform, directionless light.
14336 @cvar LIGHTING_BASIC: Basic lighting from above, front.
14337 @cvar LIGHTING_FULL: User-controllable lighting.
14338 @note: These values are exposed in the parent class, but are also documented here for convenience.
14339 """
14340 LIGHTING_FLAT = 0
14341 LIGHTING_BASIC = 1
14342 LIGHTING_FULL = 2
14343
14344 LIGHTING_FLAT = 0
14345 LIGHTING_BASIC = 1
14346 LIGHTING_FULL = 2
14347
14348 - def close(self, ConfirmIfModified=True):
14349 """Closes the project.
14350
14351 @type ConfirmIfModified: bool
14352 @param ConfirmIfModified: Set to False to suppress the confirmation dialog that normally appears if the project has been modified.
14353 @rtype: None
14354 """
14355 pass
14356
14358 """This is emitted when the project is about to close.
14359
14360 @rtype: None
14361 """
14362 pass
14363
14365 """Returns the colorspace defaults for the project.
14366
14367 @rtype: L{ColorspaceDefaults}
14368 @return: The colorspace defaults.
14369 @see: L{setColorspaceDefaults()}
14370 """
14371 pass
14372
14374 """This is emitted after the colorspace defaults are modified for this object.
14375
14376 @type Defaults: L{ColorspaceDefaults}
14377 @rtype: None
14378 """
14379 pass
14380
14382 """Returns information about the current project.
14383
14384 @rtype: L{ProjectInfo}
14385 @return: An object describing the current project
14386 """
14387 pass
14388
14390 """Returns the dirty (modified) status of the project.
14391
14392 Mari maintains a dirty state for projects when they are open. If a project is dirty it has been modified since it was loaded. Only dirty projects are saved. If a project is dirty when it is closed the user will be presented with a dialog asking them if they wish to save. Saving a project clears the dirty state.
14393
14394 This is the same as L{isModified()}.
14395
14396 @rtype: bool
14397 @return: True if the project is dirty, and has been modified since it was opened, or False otherwise
14398 """
14399 pass
14400
14402 """Returns the modified status of the project.
14403
14404 This is the same as L{isDirty()}.
14405
14406 @rtype: bool
14407 @return: True if the project has been modified since it was opened, or False otherwise
14408 """
14409 pass
14410
14412 """Returns the current lighting mode set on the main model.
14413
14414 @rtype: L{LightingMode}
14415 @return: The lighting mode set.
14416 @see: L{setLightingMode()}
14417 """
14418 pass
14419
14421 """Returns the name of the project.
14422
14423 @rtype: str
14424 @return: The name of the project.
14425 """
14426 pass
14427
14429 """Switches a given set of colorspaces for another in all configurations in the project.
14430
14431 @type ColorspaceRemappings: QMap of str, variant
14432 @param ColorspaceRemappings: Table used to define what a particular colorspace should map to, where the key is the old colorspace we want to swap, and the value is the new colorspace we want to swap it to.
14433 @type FileName: str
14434 @param FileName: Only remap if the L{OpenColorIO} configuration file matches this. If empty string is given then the remapping is done regardless of the L{OpenColorIO} configuration file.
14435 @type Stages: list of int
14436 @param Stages: The colorspace stages to consider for remapping. Used to selectively ignore colorspaces at certain stages such as the output stage. If an empty list is given then all stages are considered.
14437 @rtype: None
14438 @raise ValueError: Raised if the colorspace remapping table is empty. If any of the stages are invalid.
14439 """
14440 pass
14441
14449
14450 - def save(self, ForceSave=False):
14451 """Saves the project.
14452
14453 @type ForceSave: bool
14454 @param ForceSave: Set to True to force the save to be performed even if the project has not been modified
14455 @rtype: None
14456 """
14457 pass
14458
14460 """This is emitted after the project is saved.
14461
14462 @rtype: None
14463 """
14464 pass
14465
14467 """Sets the colorspace defaults for the project.
14468
14469 @type Defaults: L{ColorspaceDefaults}
14470 @param Defaults: The colorspace defaults.
14471 @rtype: None
14472 @raise ValueError: Raised if the colorspace defaults are invalid.
14473 @see: L{colorspaceDefaults()}
14474 """
14475 pass
14476
14478 """Sets the lighting mode on the main model.
14479
14480 @type Mode: L{LightingMode}
14481 @param Mode: The lighting mode to set.
14482 @rtype: None
14483 @see: L{lightingMode()}
14484 """
14485 pass
14486
14488 """Updates the GUI overlay resolution information for all of the patches in the project.
14489
14490 This can be useful to update patch resolution information that is out of date after patches have been resized.
14491
14492 @rtype: None
14493 """
14494 pass
14495
14497 """Returns the UUID of the project.
14498
14499 @rtype: str
14500 @return: The UUID of the project, as a string.
14501 """
14502 pass
14503
14506 """These objects are image operations that can be performed on a layer list.
14507
14508 You can access the registered image operations through the L{ImageManager} - for example:
14509
14510 C{mari.images.imageOperationList()}
14511 """
14512
14513 - def execute(self, Operation, Source, ExtraParams=None):
14514 """Executes the operation.
14515
14516 @type Operation: str
14517 @param Operation: The sub-operation to execute.
14518 @type Source: L{Image}
14519 @param Source: The image on which to execute the operation.
14520 @type ExtraParams: variant
14521 @param ExtraParams: Extra parameters for the image operation.
14522 @rtype: bool
14523 @return: The result of the image operation.
14524 """
14525 pass
14526
14528 """Returns the name of the operation.
14529
14530 @rtype: str
14531 @return: The name of the operation.
14532 """
14533 pass
14534
14536 """Returns the description of one of the operations.
14537
14538 @type Name: str
14539 @param Name: The sub-operation whose description we require.
14540 @rtype: str
14541 @return: The description corresponding to the operation.
14542 """
14543 pass
14544
14546 """Returns the supported operations by this object.
14547
14548 @rtype: list of str
14549 @return: The supported operations.
14550 """
14551 pass
14552
14553
14554 -class Layer(Metadata):
14555 """A layer in a L{Channel} is an image data operation that can be stacked on top of another layer.
14556
14557 Layers may contain their own image data, such as L{PaintableLayer}, which can be blended with other layers in a layer stack. Other layer types, such as L{AdjustmentLayer}, can specify operations to be performed on the image data from the layers below them in the stack, or in the case of L{ProceduralLayer}, can contain operations that generate new image data from a set of parameters.
14558
14559 Each layer can also contain a mask, either as an image set or a separate layer stack. Most can also contain an adjustment stack, which specifies adjustment operations to be performed only on that layer; see L{AdjustableLayer} for details.
14560
14561 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
14562
14563 B{Example Code}
14564
14565 >>> # This example finds all layers in the current channel
14566 >>> import mari
14567 >>> layers = mari.geo.current().currentChannel().layerList()
14568
14569 @cvar GREYSCALE_BLEND: Use SUM(R/3, G/3, B/3) as the input to the lookup table, this is the default.
14570 @cvar RED_BLEND: Use R as the input to the lookup table.
14571 @cvar GREEN_BLEND: Use G as the input to the lookup table.
14572 @cvar BLUE_BLEND: Use B as the input to the lookup table.
14573 @cvar LUMINANCE_BLEND: Use SUM(0.2126*R, 0.7152*G ,0.0722*B) as the input to the lookup table.
14574 @cvar BASIC_BLEND: Basic blending using only the opacity value.
14575 @cvar ADVANCED_BLEND: Enable Advanced blending.
14576 @cvar REVEAL_ALL: A mask to reveal all, this is the default.
14577 @cvar HIDE_ALL: A mask to hide all.
14578 @cvar FROM_ALPHA: A mask, created from the alpha channel.
14579 @group Signals: blendAmountChanged, blendComponentChanged, blendModeChanged, blendTypeChanged, cacheStateChanged, colorTagChanged, convertedToPaint, lockedChanged, maskCreated, maskRemoved, maskStackCreated, nameChanged, selectedChanged
14580 """
14581
14583 """When using the ADVANCED blending type Mari can use different color components (R,G,B,Greyscale) etc in conjunction with the lookup tables to pull masks from the input layers.
14584 @cvar GREYSCALE_BLEND: Use SUM(R/3, G/3, B/3) as the input to the lookup table, this is the default.
14585 @cvar RED_BLEND: Use R as the input to the lookup table.
14586 @cvar GREEN_BLEND: Use G as the input to the lookup table.
14587 @cvar BLUE_BLEND: Use B as the input to the lookup table.
14588 @cvar LUMINANCE_BLEND: Use SUM(0.2126*R, 0.7152*G ,0.0722*B) as the input to the lookup table.
14589 @note: These values are exposed in the parent class, but are also documented here for convenience.
14590 """
14591 GREYSCALE_BLEND = 0
14592 RED_BLEND = 1
14593 GREEN_BLEND = 2
14594 BLUE_BLEND = 3
14595 LUMINANCE_BLEND = 4
14596
14597 GREYSCALE_BLEND = 0
14598 RED_BLEND = 1
14599 GREEN_BLEND = 2
14600 BLUE_BLEND = 3
14601 LUMINANCE_BLEND = 4
14602
14640
14641 MIX = 1
14642 ADD = 2
14643 BURN_HIGHLIGHTS = 3
14644 BURN_MIDRANGE = 4
14645 BURN_SHADOWS = 5
14646 CLEAR = 6
14647 COLOR_BURN = 7
14648 COLOR_DODGE = 8
14649 COLOR = 9
14650 DARKEN = 10
14651 DIFFERENCE = 11
14652 DODGE_HIGHLIGHTS = 12
14653 DODGE_MIDRANGE = 13
14654 DODGE_SHADOWS = 14
14655 EXCLUSION = 15
14656 HARD_LIGHT = 16
14657 HARD_MIX = 17
14658 HUE = 18
14659 INVERSE_DIFFERENCE = 19
14660 INVERT = 20
14661 LIGHTEN = 21
14662 LUMINANCE = 22
14663 MULTIPLY = 23
14664 OVERLAY = 24
14665 PIN_LIGHT = 25
14666 SATURATION = 26
14667 SCREEN = 27
14668 SOFT_LIGHT = 28
14669 SPONGE_DESATURATE = 29
14670 VIVID_LIGHT = 30
14671 COPY = 31
14672 MIX_NORMAL_MAPS = 32
14673 ADD_NORMAL_MAPS = 33
14674 REORIENTED_NORMAL_MAPPING = 34
14675 COPY_RGB = 35
14676 CUSTOM = 100
14677
14679 """Mari has two blenidng modes, Basic or Advanced.
14680
14681 Basic blending mode takes the RGBA from the current layer and from the layer below and blends them using the chosen BlendMode to produce a result.
14682
14683 C{Out = blendMode( ThisLayer.RGBA, LayerBelow.RGBA, Opacity)}
14684
14685 Advanced blending introduces two control curves that pull masks from the current layer and the layer below These curves are used to modulate the alpha component of the two input values.
14686
14687 C{Out = blendMode( ThisLayerCurve[ThisLayer.RGBA], LayerBelowCurve[LayerBelow.RGBA], Opacity)}
14688
14689 Advanced blending gives fine grain control over how and where blending occurs based on the incoming color values
14690
14691 @cvar BASIC_BLEND: Basic blending using only the opacity value.
14692 @cvar ADVANCED_BLEND: Enable Advanced blending.
14693 @note: These values are exposed in the parent class, but are also documented here for convenience.
14694 """
14695 BASIC_BLEND = 0
14696 ADVANCED_BLEND = 1
14697
14698 BASIC_BLEND = 0
14699 ADVANCED_BLEND = 1
14700
14702 """Specify the type of mask we can add on a layer.
14703 @cvar REVEAL_ALL: A mask to reveal all, this is the default.
14704 @cvar HIDE_ALL: A mask to hide all.
14705 @cvar FROM_ALPHA: A mask, created from the alpha channel.
14706 @note: These values are exposed in the parent class, but are also documented here for convenience.
14707 """
14708 REVEAL_ALL = 0
14709 HIDE_ALL = 1
14710 FROM_ALPHA = 2
14711
14712 REVEAL_ALL = 0
14713 HIDE_ALL = 1
14714 FROM_ALPHA = 2
14715
14724
14725 SWIZZLE_DST_RED = 0
14726 SWIZZLE_DST_GREEN = 1
14727 SWIZZLE_DST_BLUE = 2
14728 SWIZZLE_DST_ALPHA = 3
14729
14740
14741 SWIZZLE_SRC_RED = 0
14742 SWIZZLE_SRC_GREEN = 1
14743 SWIZZLE_SRC_BLUE = 2
14744 SWIZZLE_SRC_ALPHA = 3
14745 SWIZZLE_SRC_ONE = 4
14746 SWIZZLE_SRC_ZERO = 5
14747
14749 """Returns the top most layer on each of the cache stacks being used that this layer is part of.
14750
14751 @rtype: list of L{Layer}
14752 @return: The top most layer on each of the cache stacks being used that this layer is part of.
14753 """
14754 pass
14755
14756 @staticmethod
14758 """Return the display name for a given advanced blend component value.
14759
14760 C{print mari.current.layer().advancedBlendComponentName( mari.Layer.RED_BLEND)}
14761
14762 @type Value: L{AdvancedBlendComponent}
14763 @param Value: The L{AdvancedBlendComponent} value to query
14764 @rtype: str
14765 @return: A human readable version of the given advanced blend component value
14766 """
14767 pass
14768
14770 """Return the advanced blend component for this layer as a string.
14771
14772 C{print mari.current.layer().advancedBlendComponentStr()}
14773
14774 @rtype: str
14775 @return: The display value for the advanced blend component value for this layer
14776 """
14777 pass
14778
14780 """Get blend amount of the layer.
14781
14782 @rtype: float
14783 @return: The blend amount of the layer
14784 @see: L{setBlendAmount()}
14785 """
14786 pass
14787
14789 """Emitted when the blend amount of the layer changes.
14790
14791 @type Amount: float
14792 @param Amount: The new value for the blend amount.
14793 @rtype: None
14794 """
14795 pass
14796
14798 """Get enabled state of the blend amount of the layer.
14799
14800 @rtype: bool
14801 @return: The enabled state of the blend amount of the layer
14802 @see: L{setBlendAmountEnabled()}
14803 """
14804 pass
14805
14807 """Emitted when the advanvced blend component of the layer is changed.
14808
14809 C{def blendComponentChanged(a):}
14810
14811 C{print "new component is ",a}
14812
14813 C{mari.utils.connect( mari.current.layer().blendComponentChanged, blendComponentChanged)}
14814
14815 @type Type: str
14816 @param Type: The new blend component for this layer
14817 @rtype: None
14818 """
14819 pass
14820
14822 """Returns the blend mode of the layer.
14823
14824 Returns CUSTOM if the blend mode is a custom one.
14825
14826 @rtype: L{BlendMode}
14827 @return: The blend mode
14828 @see: L{setBlendMode()}
14829 """
14830 pass
14831
14833 """Emitted when the blend mode of the layer changes.
14834
14835 C{def blendModeChanged(a):}
14836
14837 C{print "new mode is ",a}
14838
14839 C{mari.utils.connect( mari.current.layer().blendModeChanged, blendModeChanged)}
14840
14841 @type Mode: str
14842 @param Mode: The pretty string name of the blend mode.
14843 @rtype: None
14844 """
14845 pass
14846
14847 @staticmethod
14849 """Convert blend mode to a pretty string name.
14850
14851 @type BlendModeValue: L{BlendMode}
14852 @param BlendModeValue: The blend node value to find a string for
14853 @rtype: str
14854 @return: The pretty string name of the blend mode
14855 """
14856 pass
14857
14859 """Returns the pretty string name of the blend mode of the layer.
14860
14861 @rtype: str
14862 @return: The pretty string name of the blend mode
14863 @raise ValueError: Raised if the blend mode on the layer is not supported.
14864 """
14865 pass
14866
14868 """Return the blend type for this layer.
14869
14870 C{print mari.current.layer().blendType()}
14871
14872 @rtype: L{BlendType}
14873 @return: The L{BlendType} enabled for this layer
14874 @see: L{setBlendType()}
14875 """
14876 pass
14877
14879 """Emitted when the blend type (Basic, Advanced) of the layer is changed.
14880
14881 C{def blendTypeChanged(a):}
14882
14883 C{print "new type is ",a}
14884
14885 C{mari.utils.connect( mari.current.layer().blendTypeChanged, blendTypeChanged)}
14886
14887 @type Type: str
14888 @param Type: The new blend type for this layer
14889 @rtype: None
14890 """
14891 pass
14892
14893 @staticmethod
14895 """Convert blend type to a pretty string name.
14896
14897 C{print mari.current.layer().blendTypeName( mari.Layer.ADVANCED_BLEND)}
14898
14899 @type BlendTypeValue: L{BlendType}
14900 @param BlendTypeValue: The blend node type to find a string for
14901 @rtype: str
14902 @return: The pretty string name of the blend type
14903 """
14904 pass
14905
14907 """Returns the pretty string name of the blend type of the layer.
14908
14909 C{print mari.current.layer().blendTypeStr()}
14910
14911 @rtype: str
14912 @return: The pretty string name of the blend type
14913 @raise ValueError: Raised if the blend type on the layer is not supported.
14914 """
14915 pass
14916
14918 """Cache this layer
14919
14920 @rtype: None
14921 @raise RuntimeError: Raised if this layer cannot be cached.
14922 """
14923 pass
14924
14926 """This is emitted if the cache status changes.
14927
14928 @rtype: None
14929 """
14930 pass
14931
14933 """Caches the layer stack up to this layer
14934
14935 @rtype: None
14936 @raise RuntimeError: Raised if the layer stack up to here cannot be cached.
14937 """
14938 pass
14939
14941 """Returns the top most layer on each of the cache stacks, even if it is not in use, that this layer is part of.
14942
14943 @rtype: list of L{Layer}
14944 @return: The top most layer on each of the cache stacks, even if it is not in use, that this layer is part of.
14945 """
14946 pass
14947
14949 """Removes and deletes the layer from its layer stack.
14950
14951 @rtype: None
14952 """
14953 pass
14954
14956 """Return the current color tag of this layer.
14957
14958 @rtype: str
14959 @return: This returns the name of the color assigned to this layer. The name will be one of the valid names returned by L{colorTagNames()} or "none" if no tag is assigned
14960 @see: L{setColorTag()}
14961 """
14962 pass
14963
14965 """This is emitted when the color tag changes.
14966
14967 @type Col: str
14968 @param Col: The name of the new color tag.
14969 @rtype: None
14970 """
14971 pass
14972
14974 """Return the list of valid color tags.
14975
14976 Users may assign color tags to layers to help catagorize them. This method returns the list of valid color tags that can be assigned to layers. No other tag values will be accepted
14977
14978 @rtype: list of str
14979 """
14980 pass
14981
14983 """This is emitted when the layer is converted to paintable.
14984
14985 @type Success: bool
14986 @param Success: The result of the signal.
14987 @type ThisLayer: L{Layer}
14988 @param ThisLayer: This layer, for easy connection to other slots for updates.
14989 @rtype: None
14990 """
14991 pass
14992
14994 """Get the advance blend type component.
14995
14996 This defines how the mask is created using the input layer and the LUT
14997 C{print mari.current.layer().getAdvancedBlendComponent( )}
14998
14999 @rtype: L{AdvancedBlendComponent}
15000 @return: The current advanced blend component set on this layer
15001 """
15002 pass
15003
15005 """Return the 'Layer Below' lookup table used when advanced blending is enabled.
15006
15007 C{LUT = mari.current.layer().getLayerBelowBlendLut()}
15008
15009 @rtype: variant
15010 @return: A handle to the lookuptable
15011 """
15012 pass
15013
15015 """Return the 'This layer' lookup table used when advanced blending is enabled.
15016
15017 C{LUT = mari.current.layer().getThisLayerBlendLut()}
15018
15019 @rtype: variant
15020 @return: A handle to the lookuptable
15021 """
15022 pass
15023
15025 """Returns the group layer stack this group layer contains.
15026
15027 @rtype: L{LayerStack}
15028 @return: Returns a layer stack
15029 @raise RuntimeError: Raised if the layer is not a group layer
15030 """
15031 pass
15032
15034 """Indicates whether the stack up to this layer has cache data, even if it is not in use.
15035
15036 @rtype: bool
15037 @return: True if the stack up to this layer has cache data.
15038 """
15039 pass
15040
15042 """Indicates whether this layer has cache data, even if it is not in use.
15043
15044 @rtype: bool
15045 @return: True if this layer has cache data.
15046 """
15047 pass
15048
15050 """Indicates whether this layer has a paintable mask image set or mask stack.
15051
15052 @rtype: bool
15053 @return: True is this layer has a paintable mask image set or mask stack
15054 """
15055 pass
15056
15058 """Indicates whether this layer has a mask stack.
15059
15060 @rtype: bool
15061 @return: True if this layer has a mask stack
15062 """
15063 pass
15064
15065 - def hash(self, UVIndex=-1):
15066 """Returns a unique identifier for this layer.
15067
15068 This hash is assumed to be universally unique (256bit skein hash). This can be used to determine if a layer or its children have changed since some given checkpoint. A different hash means a different layer or children. This hash is based on image data, blend mode, parameters and anything that might effect the pixel output. Use this to detect any changes to the layers.
15069
15070 @type UVIndex: int
15071 @param UVIndex: The UV index of the patch to return the hash of, or -1 to return the hash of all the patches.
15072 @rtype: str
15073 @return: A hash string that uniquely identifies this version of this layer and its children, or an empty string on failure.
15074 @see: L{imageHash()}
15075 """
15076 pass
15077
15079 """Returns a unique identifier for this layer's image data.
15080
15081 This hash is assumed to be universally unique (256bit skein hash). This can be used to determine if a layer or its children have changed their image data since some given checkpoint. A different hash means a different layer or children. This hash is only based on image data and can be used to detect changes in the images.
15082
15083 @type UVIndex: int
15084 @param UVIndex: The UV index of the patch to return the hash of, or -1 to return the hash of all the patches.
15085 @rtype: str
15086 @return: A hash string that uniquely identifies this version of this layer and its children image data, or an empty string on failure.
15087 @see: L{hash()}
15088 """
15089 pass
15090
15092 """Indicates whether this is a channel layer.
15093
15094 @rtype: bool
15095 @return: True if this layer is a channel layer or False if not.
15096 """
15097 pass
15098
15100 """Indicates whether this is a adjustment layer.
15101
15102 @rtype: bool
15103 @return: True if this layer is a adjustment layer or False if not.
15104 """
15105 pass
15106
15108 """Indicates whether this is a bake point layer.
15109
15110 @rtype: bool
15111 @return: True if this layer is a bake point layer or False if not.
15112 @raise RuntimeError: Raised if the experimental bake point layer feature is not enabled.
15113 """
15114 pass
15115
15117 """Indicates whether the stack up to this layer is cached and the cache is being used.
15118
15119 @rtype: bool
15120 @return: True if the stack up to this layer is cached and is being used.
15121 """
15122 pass
15123
15125 """Indicates whether this is a channel layer.
15126
15127 @rtype: bool
15128 @return: True if this layer is a channel layer or False if not.
15129 """
15130 pass
15131
15133 """Indicates whether the layer is part of a cache stack that is being used.
15134
15135 @rtype: bool
15136 @return: True if the layer is part of a cache stack that is being used.
15137 """
15138 pass
15139
15141 """Indicates whether the layer is part of a cache stack, even if it is not in use.
15142
15143 @rtype: bool
15144 @return: True if the layer is part of a cache stack.
15145 """
15146 pass
15147
15149 """Indicates whether this is a node graph layer.
15150
15151 @rtype: bool
15152 @return: True if this layer is a node graph layer or False if not.
15153 """
15154 pass
15155
15157 """Indicates whether this is a group layer.
15158
15159 @rtype: bool
15160 @return: True if this layer is a channel layer or False if not.
15161 """
15162 pass
15163
15165 """Indicates whether this layer is cached and the cache is being used.
15166
15167 @rtype: bool
15168 @return: True if this layer is cached and is being used.
15169 """
15170 pass
15171
15173 """Indicates whether this layer is locked and, if so, unmodifiable.
15174
15175 @rtype: bool
15176 @return: True if this layer is locked, or False if unlocked.
15177 """
15178 pass
15179
15181 """Indicates if the mask is disabled.
15182
15183 @rtype: bool
15184 @return: False is a mask is present and disabled.
15185 """
15186 pass
15187
15189 """Indicates whether this layer is allowed to be modified.
15190
15191 This is not the same as L{isLocked()}, if a parent layer L{isLocked()} then this layer will not modifiable even though it is not locked.
15192
15193 @rtype: bool
15194 @return: True if the layer can be modified.
15195 """
15196 pass
15197
15199 """Indicates whether this is a paintable layer.
15200
15201 @rtype: bool
15202 @return: True if this layer is a paintable layer or False if not.
15203 """
15204 pass
15205
15207 """Indicates whether this is a procedural layer.
15208
15209 @rtype: bool
15210 @return: True if this layer is a procedural layer or False if not.
15211 """
15212 pass
15213
15215 """Indicates whether this layer is selected.
15216
15217 @rtype: bool
15218 @return: True if the layer is selected, or False if not.
15219 """
15220 pass
15221
15223 """Indicates whether this is a shader layer.
15224
15225 @rtype: bool
15226 @return: True if this layer is a shader layer or False if not.
15227 """
15228 pass
15229
15231 """Indicates whether this layer is shared.
15232
15233 @rtype: bool
15234 @return: True if the layer is shared, or False if not.
15235 """
15236 pass
15237
15239 """Indicates whether this layer is visible.
15240
15241 @rtype: bool
15242 @return: True if the layer is visible, or False if not.
15243 """
15244 pass
15245
15247 """Returns the node graph node that corresponds to this L{Layer}.
15248
15249 Mari's layers are all build on top of node graph. A layer consists of a Merge node, its business node which provide the content of layer and, if existing, a mask. The primary node represending a layer is its Merge node which provides the blending logic. This function returns the Merge node.
15250
15251 @rtype: L{Node}
15252 @return: the node graph Merge node that corresponds to this L{Layer}
15253 """
15254 pass
15255
15257 """This is emitted when the locked state changes.
15258
15259 @type Locked: bool
15260 @param Locked: The new locked state.
15261 @rtype: None
15262 """
15263 pass
15264
15266 """Sets this layer as the currently active layer on the currently active channel if it belongs to it and make this the current layer of the geo entity.
15267
15268 @rtype: None
15269 """
15270 pass
15271
15273 """Creates a mask image set on the layer
15274
15275 Or the layer is not modifiable.
15276
15277 @rtype: L{ImageSet}
15278 @return: Return an image set
15279 """
15280 pass
15281
15283 """Creates a mask stack on the layer
15284
15285 @rtype: L{LayerStack}
15286 @raise RuntimeError: Raised if the layer mask stack cannot be create or already exists or the layer is not modifiable.
15287 """
15288 pass
15289
15291 """This is emitted when a mask is created on a layer.
15292
15293 @type Mask: L{Layer.MaskType}
15294 @param Mask: The type of mask added (its type being L{MaskType}).
15295 @rtype: None
15296 """
15297 pass
15298
15300 """Returns the image set used by this layers mask
15301
15302 @rtype: L{ImageSet}
15303 @return: Return an image set
15304 @see: L{setMaskImageSet()}
15305 """
15306 pass
15307
15309 """This is emitted when a mask is removed on a layer.
15310
15311 @rtype: None
15312 """
15313 pass
15314
15316 """Returns the mask stack that is applied to the mask of this layer
15317
15318 @rtype: L{LayerStack}
15319 @return: Returns a layer stack
15320 @see: L{setMaskStack()}
15321 """
15322 pass
15323
15325 """This is emitted when a mask stack is created.
15326
15327 @rtype: None
15328 """
15329 pass
15330
15332 """Returns the name of the layer.
15333
15334 @rtype: str
15335 @return: The name of this layer.
15336 @see: L{setName()}
15337 """
15338 pass
15339
15341 """This is emitted after the channel has had its name changed.
15342
15343 @type NewName: str
15344 @param NewName: The new name.
15345 @rtype: None
15346 """
15347 pass
15348
15350 """Returns a list of all the layers and channels that use this layer.
15351
15352 @rtype: list of variant
15353 @return: A list of layers and channels that use this layer
15354 """
15355 pass
15356
15358 """Remove the mask stack from the layer
15359
15360 @rtype: None
15361 @raise RuntimeError: Raised if the layer mask stack cannot be removed or does not exist or the layer is not modifiable.
15362 """
15363 pass
15364
15366 """This is emitted when the selection state changes.
15367
15368 @type Selected: bool
15369 @param Selected: The new selected state.
15370 @type ThisLayer: L{Layer}
15371 @param ThisLayer: The layer that changed for easy connection to other slots for updates.
15372 @rtype: None
15373 """
15374 pass
15375
15377 """Set the advance blend type component.
15378
15379 This defines how the mask is created using the input layer and the LUT
15380
15381 C{mari.current.layer().setAdvancedBlendComponent( mari.Layer.RED_BLEND )}
15382
15383 @type Component: L{AdvancedBlendComponent}
15384 @param Component: The new component value
15385 @rtype: None
15386 @return: The current advanced blend component set on this layer
15387 """
15388 pass
15389
15391 """Sets the blend amount of the layer.
15392
15393 @type BlendAmount: float
15394 @param BlendAmount: The new value for the blend amount. This must be in the range of 0.0 to 1.0.
15395 @rtype: None
15396 @raise ValueError: Raised if the blend amount was invalid.
15397 @see: L{blendAmount()}
15398 """
15399 pass
15400
15402 """Enables or Disables the blend amount of the layer.
15403
15404 @type Enabled: bool
15405 @param Enabled: The new enabled state to set the blend amount to.
15406 @rtype: None
15407 @see: L{blendAmountEnabled()}
15408 """
15409 pass
15410
15412 """Sets the blend mode of the layer.
15413
15414 @type BlendModeValue: variant
15415 @param BlendModeValue: The new value for the blend mode. Both the L{BlendMode} enum and the name of the blend mode is accepted.
15416 @rtype: None
15417 @raise ValueError: Raised if the blend mode was invalid.
15418 @see: L{blendMode()}
15419 """
15420 pass
15421
15423 """Set the blend type for this layer.
15424
15425 C{mari.current.layer().setBlendType(mari.Layer.ADVANCED_BLEND)}
15426
15427 @type Type: L{BlendType}
15428 @param Type: The type of blending to enable for this layer
15429 @rtype: None
15430 @see: L{blendType()}
15431 """
15432 pass
15433
15435 """sets the cached state up to this layer.
15436
15437 @type Cache: bool
15438 @param Cache: Whether to cache up to this layer. True has the same effect as L{cacheUpToHere()} while False has the same effect as L{uncacheUpToHere()}.
15439 @rtype: None
15440 """
15441 pass
15442
15444 """Set the tag color for this layer.
15445
15446 This is a GUI only tag that allows users to catagorize layers by assigning a color tag
15447
15448 @type Col: str
15449 @param Col: The name of the color tag to assign. This should be one of the valid tags returned by L{colorTagNames()}. Pass "none" to clear any existing tag.
15450 @rtype: None
15451 @raise ValueError: If col is not a valid color tag name
15452 @see: L{colorTag()}
15453 """
15454 pass
15455
15457 """Set the "Layer Below" LUT to use when advanced blending
15458
15459 C{LUT = mari.current.layer().getLayerBelowBlendLut()}
15460
15461 C{LUT.setLinear(0,1)}
15462
15463 C{mari.current.layer().setLayerBelowBlendLut(LUT)}
15464
15465 @type NewLut: L{LookUpTable}
15466 @param NewLut: A Handle to the new LUT to apply when advanced blending
15467 @rtype: None
15468 """
15469 pass
15470
15472 """sets the layer cached state of this layer.
15473
15474 @type Cache: bool
15475 @param Cache: Whether to cache this layer. True has the same effect as L{cacheLayer()} while False has the same effect as L{uncacheLayer()}.
15476 @rtype: None
15477 """
15478 pass
15479
15481 """Locks or unlocks the layer, to optionally prevent modifications.
15482
15483 @type Lock: bool
15484 @param Lock: True to lock the layer, or False to unlock it.
15485 @rtype: None
15486 """
15487 pass
15488
15490 """Set the enabled state of the layers mask.
15491
15492 @type Enabled: bool
15493 @param Enabled: The enabled state to set the mask to
15494 @rtype: None
15495 """
15496 pass
15497
15499 """Sets a L{Image} set as the layer's mask
15500
15501 Or the mask is not modifiable.
15502
15503 @type Mask: L{ImageSet}
15504 @rtype: None
15505 @see: L{maskImageSet()}
15506 """
15507 pass
15508
15510 """Sets a L{LayerStack} as the layer's mask stack
15511
15512 Or the layer is not modifiable.
15513
15514 @type MaskStack: L{LayerStack}
15515 @rtype: None
15516 @see: L{maskStack()}
15517 """
15518 pass
15519
15521 """Sets the name of the layer.
15522
15523 @type NewName: str
15524 @param NewName: The new name for the layer.
15525 @rtype: None
15526 @see: L{name()}
15527 """
15528 pass
15529
15531 """Sets the selected status of the layer.
15532
15533 @type Selected: bool
15534 @param Selected: True to select layer, or False to unselect it.
15535 @rtype: None
15536 """
15537 pass
15538
15540 """Set one of the layer's color component sources.
15541
15542 @type Dst: L{SwizzleDestination}
15543 @param Dst: The component to change.
15544 @type Src: L{SwizzleSource}
15545 @param Src: The source to takde the component from.
15546 @rtype: None
15547 @see: L{swizzle()}
15548 """
15549 pass
15550
15552 """Set the "This Layer" LUT to use when advanced blending
15553
15554 C{LUT = mari.current.layer().getThisLayerBlendLut()}
15555
15556 C{LUT.setLinear(0,1)}
15557
15558 C{mari.current.layer().setThisLayerBlendLut(LUT)}
15559
15560 @type NewLut: L{LookUpTable}
15561 @param NewLut: A Handle to the new LUT to apply when advanced blending
15562 @rtype: None
15563 """
15564 pass
15565
15567 """Shows or hides the layer.
15568
15569 @type Visible: bool
15570 @param Visible: True to show the layer, or False to hide it.
15571 @rtype: None
15572 """
15573 pass
15574
15576 """Returns the list of layers that share the resources with this layer.
15577
15578 @rtype: list of L{Layer}
15579 @return: The list of layers that share the resources with this layer
15580 """
15581 pass
15582
15584 """Get the specified layer's color components source.
15585
15586 @type Dst: L{SwizzleDestination}
15587 @rtype: L{SwizzleSource}
15588 @see: L{setSwizzle()}
15589 """
15590 pass
15591
15593 """Deletes the cache of this layer
15594
15595 @rtype: None
15596 @raise RuntimeError: Raised if the cache for this layer cannot be deleted.
15597 """
15598 pass
15599
15601 """Deletes the cache of the layer stack up to this layer
15602
15603 @rtype: None
15604 @raise RuntimeError: Raised if the cache for layer stack up to here cannot be deleted.
15605 """
15606 pass
15607
15610 """A floating-point slider widget.
15611
15612 Provides a custom single-precision floating-point slider widget.
15613
15614 B{Example Code}
15615
15616 >>> # This example creates a new FloatSlider object, add it to a QWidget and show it
15617 >>> import mari
15618 >>> import PySide
15619 >>> float_slider = mari.FloatSlider()
15620 >>> container = PySide.QtGui.QWidget()
15621 >>> container.setLayout(PySide.QtGui.QHBoxLayout())
15622 >>> float_slider.addToLayout(container.layout())
15623 >>> container.show()
15624
15625 @group Signals: valueChanged
15626 """
15627
15629 """Sets the value of the slider.
15630
15631 @type Value: float
15632 @param Value: The value to set the slider to.
15633 @rtype: None
15634 @see: L{value()}
15635 """
15636 pass
15637
15639 """Returns the value of the slider.
15640
15641 @rtype: float
15642 @return: The value of the slider.
15643 @see: L{setValue()}
15644 """
15645 pass
15646
15648 """This is emitted when the value of the slider changes.
15649
15650 @type Value: float
15651 @param Value: The value the slider has changed to.
15652 @rtype: None
15653 """
15654 pass
15655
15657 """Sets to the float slider specified by the given components.
15658
15659 @type Parent: QWidget
15660 @rtype: L{FloatSlider}
15661 """
15662 pass
15663
15666 """A selection group object.
15667
15668 @group Signals: nameChanged
15669 """
15670
15672 """Returns the name of the selection group.
15673
15674 @rtype: str
15675 @return: The name of the selection group.
15676 @see: L{setEntityName()}
15677 """
15678 pass
15679
15681 """Returns the name of the object.
15682
15683 @rtype: str
15684 @return: The name of this object
15685 """
15686 pass
15687
15689 """Emitted when the selection group is renamed.
15690
15691 @type name: str
15692 @param name: The new L{name}.
15693 @rtype: None
15694 """
15695 pass
15696
15698 """Return the selection mode of the group.
15699
15700 @rtype: L{SelectionGroupManager.SelectionMode}
15701 @return: The selection mode of the group.
15702 """
15703 pass
15704
15706 """Sets the L{name} of the selection group.
15707
15708 @type name: str
15709 @param name: The L{name} to set for the selection group
15710 @rtype: None
15711 @see: L{entityName()}
15712 """
15713 pass
15714
15717 """Represents an image set node.
15718
15719 B{Example Code}
15720
15721 This example shows how to create a L{PaintNode}
15722
15723 >>> import mari
15724 >>> nodeGraph = mari.geo.current().nodeGraph()
15725 >>> paintNode = nodeGraph.createPaintNode( 1024, 1024, 8, mari.Color(1.0,1.0,0.0,1.0) )
15726
15727 This example obtains a paint node from the node graph of the current geo entity and
15728
15729 >>> for node in nodeGraph.nodeList():
15730 ... if node.isPaintNode():
15731 ... mari.app.log( "Found PaintNode : "+node.nodeName() )
15732 """
15733
15735 """Returns the image set this node holds.
15736
15737 @rtype: L{ImageSet}
15738 @return: The image set this node holds.
15739 @raise RuntimeError: Raised if the image set cannot be found.
15740 """
15741 pass
15742
15744 """Returns whether this node is a paint node.
15745
15746 @rtype: bool
15747 @return: Whether this node is a paint node
15748 """
15749 pass
15750
15751
15752 -class Camera(Metadata):
15753 """Provides 3D camera settings.
15754
15755 B{Example Code}
15756
15757 >>> # This example obtains the camera of the current canvas view
15758 >>> import mari
15759 >>> camera = mari.canvases.current().camera()
15760 >>> mari.app.log("Position = "+str(camera.translation().asTuple()))
15761
15762 @cvar PERSPECTIVE: 3D Perspective of 3D geometry
15763 @cvar ORTHOGRAPHIC: 2D Orthographic of 3D geometry
15764 @cvar UV: 2D Orthographic of UV space
15765 @group Signals: attributeChanged, moved
15766 """
15767
15769 """These are the viewing modes.
15770 @cvar PERSPECTIVE: 3D Perspective of 3D geometry
15771 @cvar ORTHOGRAPHIC: 2D Orthographic of 3D geometry
15772 @cvar UV: 2D Orthographic of UV space
15773 @note: These values are exposed in the parent class, but are also documented here for convenience.
15774 """
15775 PERSPECTIVE = 0
15776 ORTHOGRAPHIC = 1
15777 UV = 2
15778
15779 PERSPECTIVE = 0
15780 ORTHOGRAPHIC = 1
15781 UV = 2
15782
15784 """Adjusts the Near and Far clip planes so they contain the current geometry.
15785
15786 @rtype: None
15787 """
15788 pass
15789
15791 """This is emitted when the camera has had an internal attribute changed.
15792
15793 For example, this can be triggered by changes to the field of view, near or far clip plane, type, or name.
15794
15795 @rtype: None
15796 """
15797 pass
15798
15800 """Returns the far clip plane.
15801
15802 @type Frame: int
15803 @rtype: float
15804 @see: L{setFarClip()}
15805 """
15806 pass
15807
15809 """Returns the field of view.
15810
15811 @type Frame: int
15812 @rtype: float
15813 @return: The field of view in degrees
15814 @raise RuntimeError: Raised if the camera is not a perspective camera.
15815 @see: L{setFieldOfView()}
15816 """
15817 pass
15818
15820 """Returns the horizontal field of view.
15821
15822 @type Frame: int
15823 @rtype: float
15824 @return: The field of view in degrees
15825 @raise RuntimeError: Raised if the camera is not a perspective camera.
15826 @see: L{setFieldOfViewX()}
15827 """
15828 pass
15829
15831 """Returns the vertical field of view.
15832
15833 @type Frame: int
15834 @rtype: float
15835 @return: The field of view in degrees
15836 @raise RuntimeError: Raised if the camera is not a perspective camera.
15837 @see: L{setFieldOfViewY()}
15838 """
15839 pass
15840
15842 """Returns whether the camera is animated.
15843
15844 @rtype: bool
15845 @return: True if the camera can be accessed for animation data, or False otherwise.
15846 """
15847 pass
15848
15850 """Returns the present look-at point.
15851
15852 @type Frame: int
15853 @rtype: L{VectorN}
15854 @return: The 3D position the camera is looking at
15855 @see: L{setLookAt()}
15856 """
15857 pass
15858
15860 """This is emitted after the camera has been moved: translated, scaled or rotated.
15861
15862 @rtype: None
15863 """
15864 pass
15865
15867 """Returns the name of the camera.
15868
15869 @rtype: str
15870 @return: The name of the camera.
15871 @see: L{setName()}
15872 """
15873 pass
15874
15876 """Returns the near clip plane.
15877
15878 @type Frame: int
15879 @rtype: float
15880 @see: L{setNearClip()}
15881 """
15882 pass
15883
15885 """Returns the camera perspective aspect ratio
15886
15887 @rtype: float
15888 @raise RuntimeError: Raised if the camera is not a perspective camera.
15889 """
15890 pass
15891
15893 """Returns the entire 4x4 projection matrix of the camera.
15894
15895 The result will be a tuple of four tuples of floats representing the rows of the matrix - for example:
15896 - ((1.0, 0.0, 0.0, 0.0), (0.0, 1.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0), (0.0, 0.0, 0.0, 1.0))
15897 The matrix will use the right-handed coordinate system.
15898
15899 @type AspectRatio: float
15900 @param AspectRatio: The ratio of width to height of the viewport. If not supplied (or zero), it defaults to the camera's L{viewportAspectRatio()}
15901 @type Frame: int
15902 @param Frame: The frame number to return the matrix for, or -1 (the default) to return the value for the current frame
15903 @rtype: variant
15904 @return: The camera's view matrix, as described above
15905 """
15906 pass
15907
15909 """Returns the camera scale.
15910
15911 @rtype: float
15912 @return: The camera view scale
15913 @see: L{setScale()}
15914 """
15915 pass
15916
15918 """Sets if the camera is animated.
15919
15920 @type Animated: bool
15921 @rtype: None
15922 """
15923 pass
15924
15926 """Sets the distance to the far clip plane.
15927
15928 @type FarClip: float
15929 @rtype: None
15930 @see: L{farClip()}
15931 """
15932 pass
15933
15935 """Sets both the horizontal and vertical fields of view.
15936
15937 This also removes existing animation key frames.
15938
15939 @type FieldOfView: float
15940 @rtype: None
15941 @raise RuntimeError: Raised if the camera is not a perspective camera.
15942 @see: L{fieldOfView()}
15943 """
15944 pass
15945
15947 """Sets the horizontal field of view.
15948
15949 This also removes existing animation key frames.
15950
15951 @type FieldOfView: float
15952 @rtype: None
15953 @raise RuntimeError: Raised if the camera is not a perspective camera.
15954 @see: L{fieldOfViewX()}
15955 """
15956 pass
15957
15959 """Sets the vertical field of view.
15960
15961 This also removes existing animation key frames.
15962
15963 @type FieldOfView: float
15964 @rtype: None
15965 @raise RuntimeError: Raised if the camera is not a perspective camera.
15966 @see: L{fieldOfViewY()}
15967 """
15968 pass
15969
15971 """Rotates the camera to look at the provided position.
15972
15973 @type pLookAt: L{VectorN}
15974 @rtype: None
15975 @see: L{lookAt()}
15976 """
15977 pass
15978
15980 """Sets the camera name.
15981
15982 @type Name: str
15983 @rtype: None
15984 @see: L{name()}
15985 """
15986 pass
15987
15989 """Sets the distance to the near clip plane.
15990
15991 @type NearClip: float
15992 @rtype: None
15993 @see: L{nearClip()}
15994 """
15995 pass
15996
15998 """Sets the camera scale.
15999
16000 @type Scale: float
16001 @rtype: None
16002 @see: L{scale()}
16003 """
16004 pass
16005
16007 """Sets the translation (or position) of the camera.
16008
16009 @type pLookAt: L{VectorN}
16010 @rtype: None
16011 @see: L{translation()}
16012 """
16013 pass
16014
16016 """Sets the camera display mode.
16017
16018 @type Type: L{Type}
16019 @rtype: None
16020 @see: L{type()}
16021 """
16022 pass
16023
16024 - def setUp(self, pLookAt):
16025 """Rotates the camera so that the specified vector is straight "up".
16026
16027 @type pLookAt: L{VectorN}
16028 @rtype: None
16029 @see: L{up()}
16030 """
16031 pass
16032
16034 """Returns the camera location.
16035
16036 @type Frame: int
16037 @rtype: L{VectorN}
16038 @return: The 3D position of the camera
16039 @see: L{setTranslation()}
16040 """
16041 pass
16042
16044 """Return the display mode of the camera.
16045
16046 @rtype: L{Type}
16047 @return: the type of camera
16048 @see: L{setType()}
16049 """
16050 pass
16051
16052 - def up(self, Frame=0):
16053 """Returns the present up vector.
16054
16055 @type Frame: int
16056 @rtype: L{VectorN}
16057 @return: The 3D direction pointing "up" from the top of the camera
16058 @see: L{setUp()}
16059 """
16060 pass
16061
16063 """Returns the entire 4x4 view matrix of the camera.
16064
16065 The result will be a tuple of four tuples of floats representing the rows of the matrix - for example:
16066 - ((1.0, 0.0, 0.0, 0.0), (0.0, 1.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0), (0.0, 0.0, 0.0, 1.0))
16067 The matrix will use the right-handed coordinate system.
16068
16069 @type Frame: int
16070 @param Frame: The frame number to return the matrix for, or -1 (the default) to return the value for the current frame
16071 @rtype: variant
16072 @return: The camera's view matrix, as described above
16073 """
16074 pass
16075
16077 """Returns a rectangle describing the camera viewport.
16078
16079 @rtype: QRect
16080 @return: The rectangle of the viewport.
16081 """
16082 pass
16083
16085 """Returns the viewport aspect ratio.
16086
16087 @rtype: float
16088 @return: The aspect ratio of the viewport
16089 """
16090 pass
16091
16092
16093 -class PostFilterCollection(Metadata):
16094 """A collection of post processing, image space filters.
16095
16096 These filters are applied to the canvas display after rendering. These filters can be used for color correction, bloom or other fancy effects. Filters are written as GLSL shader fragments, and can have uniform values and texture data as well.
16097
16098 L{PostFilterCollection} instances can be created by calling L{GLRender.createPostFilterCollection()}.
16099
16100 B{Example Code}
16101
16102 >>> # This examples creates a new FileLUTFilter object through GLRender and PostFilterCollection
16103 >>> import mari
16104 >>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")
16105 >>> file_lut = filter_collection.createFileLUT("New File LUT")
16106 >>> mari.gl_render.deletePostFilterCollection(filter_collection)
16107
16108 @cvar POSTFILTERCOLLECTION_EDITABLE: The collection can have filters added and removed by users.
16109 @cvar POSTFILTERCOLLECTION_REMOVABLE: The collection can be removed by users.
16110 @cvar POSTFILTERCOLLECTION_RENAMABLE: The collection can be renamed by users.
16111 """
16112
16114 """Specifies the options that can be set on collections.
16115
16116 These options can be combined using binary 'or' operations - for example:
16117
16118 C{import mari}
16119
16120 C{>>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")}
16121
16122 C{>>> filter_collection.setFlags(filter_collection.POSTFILTERCOLLECTION_EDITABLE | filter_collection.POSTFILTERCOLLECTION_REMOVABLE)}
16123
16124 C{>>> mari.gl_render.deletePostFilterCollection(filter_collection)}
16125
16126 @cvar POSTFILTERCOLLECTION_EDITABLE: The collection can have filters added and removed by users.
16127 @cvar POSTFILTERCOLLECTION_REMOVABLE: The collection can be removed by users.
16128 @cvar POSTFILTERCOLLECTION_RENAMABLE: The collection can be renamed by users.
16129 @note: These values are exposed in the parent class, but are also documented here for convenience.
16130 """
16131 POSTFILTERCOLLECTION_EDITABLE = 1 << 0
16132 POSTFILTERCOLLECTION_REMOVABLE = 1 << 1
16133 POSTFILTERCOLLECTION_RENAMABLE = 1 << 2
16134
16135 POSTFILTERCOLLECTION_EDITABLE = 1 << 0
16136 POSTFILTERCOLLECTION_REMOVABLE = 1 << 1
16137 POSTFILTERCOLLECTION_RENAMABLE = 1 << 2
16138
16140 """Removes all of the filters held by the collection.
16141
16142 @rtype: None
16143 """
16144 pass
16145
16146 - def createCustomLUT(self, Name, Index=-1):
16147 """Creates a new custom LUT post processing filter that can be applied to the viewport.
16148
16149 @type Name: str
16150 @param Name: The name for the new filter
16151 @type Index: int
16152 @param Index: The index to insert the new filter at. If -1 is given, the new filter will be appended to the end of the collection
16153 @rtype: L{CustomLUTFilter}
16154 @return: A new post process custom LUT filter object
16155 """
16156 pass
16157
16158 - def createFileLUT(self, Name, Index=-1):
16159 """Creates a new file LUT post processing filter that can be applied to the viewport.
16160
16161 @type Name: str
16162 @param Name: The name for the new filter
16163 @type Index: int
16164 @param Index: The index to insert new filter at. If -1 is given, the new filter will be appended to the end of the collection
16165 @rtype: L{FileLUTFilter}
16166 @return: A new post process file LUT filter object
16167 """
16168 pass
16169
16170 - def createGLSL(self, Name, DefinitionsSnippet="", BodySnippet="", Index=-1):
16171 """Creates a new GLSL post processing filter that can be applied to the viewport.
16172
16173 Mari supports post-render processing effects. These can be used to color-correct, blur, filter or warp the viewport display to achieve different effects.
16174
16175 Filters are implemented as two snippets of GLSL shader code:
16176 - The L{DefinitionsSnippet} defines uniforms and functions required for the filter
16177 - The L{BodySnippet} contains the implementation of the filter itself
16178 As multiple instances of a filter can be created, we need to give each instance a unique ID. To do this, all uniforms and function names in the shader should have a _$ID_ appended to their names. Mari takes this token internally and adds a unique ID. This preventing name collisions in shaders. For example, a definitions snippet that looks like:
16179
16180 C{uniform float ScaleX_$ID_;}
16181
16182 C{uniform float ScaleY_$ID_;}
16183
16184 will be translated internally into:
16185
16186 C{uniform float ScaleX1;}
16187
16188 C{uniform float ScaleY2;}
16189
16190 Body snippets should be protected with braces, and can expect the color value of the pixel being processed to be available in a vec4 called "Out".
16191
16192 If you wanted to simply multiply the viewport display pixels by a floating point value, for example, you could write something like:
16193
16194 C{definition_snippet = "uniform float ScaleValue_$ID_;"}
16195
16196 C{body_snippet = "{ Out.rgb *= ScaleValue_$ID_; }"}
16197
16198 The values passed into the shader can be controlled by modifying a metadata value on the L{PostFilter} object. The metadata value should have the same name and type as the uniform, but should not include the _$ID_. In the scaling example above, we could add some metadata to the filter called ScaleValue, and this would then be passed into the shader automatically.
16199
16200 @type Name: str
16201 @param Name: The name for the new filter
16202 @type DefinitionsSnippet: str
16203 @param DefinitionsSnippet: A snippet of GLSL code that defines the uniforms and functions used by this post process filter
16204 @type BodySnippet: str
16205 @param BodySnippet: A snippet of GLSL code that defines the body of the post process filter
16206 @type Index: int
16207 @param Index: The index to insert the new filter at. If -1 is given, the new filter is appended to the end of the collection
16208 @rtype: L{GLSLFilter}
16209 @return: A new post process filter object
16210 """
16211 pass
16212
16213 - def filters(self):
16214 """Returns the post process filters in the collection.
16215
16216 These post process filters are executed in order.
16217
16218 @rtype: list of L{PostFilter}
16219 @return: A list of all post process filters within the collection
16220 """
16221 pass
16222
16223 - def find(self, Name):
16224 """Returns the first occurrence of a filter with the given name.
16225
16226 @type Name: str
16227 @param Name: The name of filter to find
16228 @rtype: L{PostFilter}
16229 @return: A filter with the given name, or None if not found
16230 """
16231 pass
16232
16234 """Returns the flags of the collection.
16235
16236 @rtype: int
16237 @return: The flags of the collection. See L{PostFilterCollectionFlags}.
16238 @see: L{setFlags()}
16239 """
16240 pass
16241
16242 - def indexOf(self, Filter, StartAt=0):
16243 """Returns the index of a filter.
16244
16245 @type Filter: L{PostFilter}
16246 @param Filter: The filter to return the index of
16247 @type StartAt: int
16248 @param StartAt: Index to start searching from
16249 @rtype: int
16250 @return: The index position of the first occurrence of a filter in the collection, searching forward from index position L{StartAt}. Returns -1 if no matching item was found
16251 """
16252 pass
16253
16254 - def isReadOnly(self):
16255 """Returns whether the collection is read only.
16256
16257 DEPRICATED: This function will be removed in a future version. Please use 'read_only = collection.flags() is (collection.POSTFILTERCOLLECTION_EDITABLE | collection.POSTFILTERCOLLECTION_REMOVABLE)'.
16258
16259 @rtype: bool
16260 """
16261 pass
16262
16263 - def move(self, Filter, Index):
16264 """Moves a single filter within the collection.
16265
16266 @type Filter: L{PostFilter}
16267 @param Filter: The filter to move
16268 @type Index: int
16269 @param Index: The index to move the filter to
16270 @rtype: None
16271 """
16272 pass
16273
16275 """Returns the name of the collection.
16276
16277 @rtype: str
16278 @return: The unique name of the collection.
16279 """
16280 pass
16281
16282 - def remove(self, Filter):
16283 """Deletes (removes) a filter from the collection.
16284
16285 @type Filter: L{PostFilter}
16286 @param Filter: The filter to delete
16287 @rtype: None
16288 @raise ValueError: Raised if the filter is not a member of this collection.
16289 """
16290 pass
16291
16292 - def setFlags(self, Flags):
16293 """Modifies the flags of the collection.
16294
16295 @type Flags: int
16296 @param Flags: The flags of the collection. See L{PostFilterCollectionFlags}.
16297 @rtype: None
16298 @see: L{flags()}
16299 """
16300 pass
16301
16302 - def setReadOnly(self, ReadOnly):
16303 """Sets whether the collection is read only.
16304
16305 DEPRICATED: This function will be removed in a future version. Please use 'collection.setFlags(collection.POSTFILTERCOLLECTION_EDITABLE | collection.POSTFILTERCOLLECTION_REMOVABLE)'.
16306
16307 @type ReadOnly: bool
16308 @rtype: None
16309 """
16310 pass
16311
16313 """Returns the number of filters in the collection.
16314
16315 @rtype: int
16316 """
16317 pass
16318
16395
16398 """An action to run a Python script, which can be assigned to a menu and/or shortcut.
16399
16400 B{Example Code}
16401
16402 >>> # This example creates an action to print "Hello World" to the log and executes the action
16403 >>> import mari
16404 >>> action = mari.actions.create("MyCustomActions/Print Hello","mari.app.log('Hello World')")
16405 >>> action.trigger()
16406
16407 @group Signals: triggered
16408 """
16409
16411 """Returns the script currently set for the action.
16412
16413 @rtype: str
16414 @see: L{setScript()}
16415 """
16416 pass
16417
16419 """Modifies the script to run for the action.
16420
16421 @type rScript: str
16422 @rtype: None
16423 @see: L{script()}
16424 """
16425 pass
16426
16428 """This is emitted when the action is triggered by Python or GUI interaction.
16429
16430 @rtype: None
16431 @see: L{trigger()}
16432 """
16433 pass
16434
16437 """An object that can have copies of its state taken at particular times.
16438
16439 A L{Snapshot} is a copy of the state of an object at a particular time. Objects of this type can have snapshots of their state taken.
16440
16441 @group Signals: snapshotAdded, snapshotRemoved
16442 """
16443
16445 """Creates a new snapshot of the object.
16446
16447 @type Name: str
16448 @param Name: A descriptive name for this snapshot. There is no restriction on naming convention, so it is recommended to make this clear, such as "new test version".
16449 @type ID: str
16450 @param ID: An optional identifier for this snapshot. This value can be used to group together sets of snapshots, as described in L{Snapshot.setID()}.
16451 @rtype: L{Snapshot}
16452 @return: The newly created snapshot.
16453 """
16454 pass
16455
16457 """Deletes the given snapshot.
16458
16459 @type ShotToDelete: L{Snapshot}
16460 @param ShotToDelete: The snapshot to delete
16461 @rtype: None
16462 @raise ValueError: The snapshot provided was invalid, or not owned by this object.
16463 @warning: This method cannot be undone, so please use caution.
16464 """
16465 pass
16466
16468 """Returns the snapshot with the given identifier, if found.
16469
16470 If more than one snapshot with the given identifier exists, the first one will be returned.
16471
16472 @type ID: str
16473 @param ID: The shot identifier to search for
16474 @rtype: L{Snapshot}
16475 @return: The first snapshot with the given identifier, or None
16476 """
16477 pass
16478
16480 """Reverts the state of the object to that in the given snapshot.
16481
16482 @type OldSnapshot: L{Snapshot}
16483 @param OldSnapshot: A valid snapshot of this object
16484 @rtype: None
16485 @raise ValueError: The snapshot provided was invalid, or not owned by this object.
16486 """
16487 pass
16488
16490 """This is emitted after a snapshot is created for this object.
16491
16492 @type NewSnapshot: L{Snapshot}
16493 @rtype: None
16494 """
16495 pass
16496
16498 """Returns a list of the snapshots available on the object.
16499
16500 @rtype: list of L{Snapshot}
16501 @return: A list of the available snapshots
16502 """
16503 pass
16504
16506 """This is emitted after a snapshot is deleted for this object.
16507
16508 @type OldSnapshot: L{Snapshot}
16509 @rtype: None
16510 """
16511 pass
16512
16515 """Provides information about a channel to create or import."""
16516
16518 """Returns the colorspace configuration for color data of the channel.
16519
16520 @rtype: L{ColorspaceConfig}
16521 @return: The colorspace configuration.
16522 @see: L{setColorspaceConfig()}
16523 """
16524 pass
16525
16527 """Returns the bit depth of the channel.
16528
16529 @rtype: L{Image.Depth}
16530 @see: L{setDepth()}
16531 """
16532 pass
16533
16535 """Returns the name of the file space the channel will import and export data as.
16536
16537 @rtype: L{Image.FileSpace}
16538 @see: L{setFileSpace()}
16539 """
16540 pass
16541
16543 """Returns the template used to generate the file name.
16544
16545 @rtype: str
16546 @return: The template for the file name. See L{setFileTemplate()} for details of the supported replaceable tokens.
16547 @see: L{setFileTemplate()}
16548 """
16549 pass
16550
16552 """Returns the color that the channel will be filled with on creation.
16553
16554 @rtype: L{Color}
16555 @see: L{setFillColor()}
16556 """
16557 pass
16558
16560 """Returns the height of the channel's textures.
16561
16562 Textures in channels must always be square, so this will be the same as the width.
16563
16564 @rtype: int
16565 @see: L{width()}, L{setSize()}, L{setWidth()}, L{size()}, L{setHeight()}
16566 """
16567 pass
16568
16570 """Returns True if the channel is scalar, or False if it is color.
16571
16572 @rtype: bool
16573 @deprecated: This concept has been replaced by the OCIO colorspace system so is no longer used. It will be removed in a future version.
16574 """
16575 pass
16576
16578 """Returns the name of the channel.
16579
16580 @rtype: str
16581 @see: L{setName()}
16582 """
16583 pass
16584
16586 """Returns the base path for the channel's textures.
16587
16588 @rtype: str
16589 @see: L{setPath()}
16590 """
16591 pass
16592
16594 """Returns the colorspace configuration for scalar data of the channel.
16595
16596 New masks created in this channel will use this colorspace configuration. However, shared masks and individual patches may not respect this colorspace depending on how it's been adjusted elsewhere.
16597
16598 @rtype: L{ColorspaceConfig}
16599 @return: The colorspace configuration for scalar data.
16600 @see: L{setScalarColorspaceConfig()}
16601 """
16602 pass
16603
16605 """Sets the colorspace configuration for color data of the channel.
16606
16607 @type Config: L{ColorspaceConfig}
16608 @param Config: The colorspace configuration.
16609 @rtype: None
16610 @raise ValueError: Raised if the colorspace configuration is invalid.
16611 @see: L{colorspaceConfig()}
16612 """
16613 pass
16614
16616 """Sets the bit depth of the channel.
16617
16618 @type NewDepth: L{Image.Depth}
16619 @rtype: None
16620 @see: L{depth()}
16621 """
16622 pass
16623
16625 """Set the name of the file space the channel will import and export data as.
16626
16627 @type FileSpace: L{Image.FileSpace}
16628 @rtype: None
16629 @see: L{fileSpace()}
16630 """
16631 pass
16632
16634 """Sets the template used to generate the file name.
16635
16636 File templates are used to create the file names for each individual patch to load for the channel. The file names are copied from the template, with the following supported tokens replaced with their appropriate values:
16637 - $PATH - The base path for the textures, as returned by the L{path()} function
16638 - $ENTITY - The name of the geometry object (or entity) that the images are being imported into
16639 - $CHANNEL - The name of the channel in the geometry object (or entity)
16640 - $LAYER - The name of the individual layer in the channel
16641 - $IMAGESET - The UUID of the channel in the layer
16642 - $UDIM - A special number indicating the index of the patch in the channel
16643 - $NUMBER - The number of the patch within the batch, starting from zero
16644 - $INDEX - Same as $NUMBER
16645 - $COUNT - The number of patches in the channel
16646 See L{GeoPatch.udim()} for a description of UDIM values.
16647
16648 @type rTemplate: str
16649 @param rTemplate: The template string to use for the patch file names
16650 @rtype: None
16651 @see: L{fileTemplate()}, L{mari.examples.create_blacksmith_project.createBlacksmithProject()}
16652 """
16653 pass
16654
16656 """Sets the color that the channel will be filled with on creation.
16657
16658 @type pCol: L{Color}
16659 @rtype: None
16660 @see: L{fillColor()}
16661 """
16662 pass
16663
16665 """Sets the height (and width) of the channel's textures.
16666
16667 @type Height: int
16668 @rtype: None
16669 @raise ValueError: Raised if the new dimensions of the channel (after setting both the width and height) are invalid.
16670 @note: Textures in channels must always be square, so this will set the width as well as the height.
16671 @see: L{width()}, L{setWidth()}, L{height()}, L{setSize()}, L{size()}
16672 """
16673 pass
16674
16676 """Sets the name of the channel.
16677
16678 @type rName: str
16679 @rtype: None
16680 @see: L{name()}
16681 """
16682 pass
16683
16685 """Sets the base path for the channel's textures.
16686
16687 @type rPath: str
16688 @rtype: None
16689 @see: L{path()}
16690 """
16691 pass
16692
16694 """Sets the channel to be scalar (True) or color (False).
16695
16696 @type Scalar: bool
16697 @rtype: None
16698 @deprecated: This concept has been replaced by the OCIO colorspace system so is no longer used. It will be removed in a future version.
16699 """
16700 pass
16701
16703 """Sets the colorspace configuration for scalar data of the channel.
16704
16705 The colorspace configuration set here will be propagated down to all non-shared masks and their patches contained in the channel. The colorspace configuration for Images (patches) may be altered by calling the appropriate functions on these objects.
16706
16707 @type Config: L{ColorspaceConfig}
16708 @param Config: The colorspace configuration for scalar data.
16709 @rtype: None
16710 @raise ValueError: Raised if the colorspace configuration is invalid.
16711 @see: L{scalarColorspaceConfig()}
16712 """
16713 pass
16714
16716 """Sets the shader category of the channel.
16717
16718 @type rShader: str
16719 @param rShader: The shader that this channel should be plugged into.
16720 @rtype: None
16721 @see: L{shader()}
16722 """
16723 pass
16724
16725 - def setSize(self, WidthAndHeight):
16726 """Sets the width and height of the channel, which must be the same.
16727
16728 @type WidthAndHeight: int
16729 @param WidthAndHeight: The width and height of the channel, which must be the same
16730 @rtype: None
16731 @raise ValueError: Raised if the new dimensions of the channel are invalid.
16732 @see: L{width()}, L{setWidth()}, L{height()}, L{setHeight()}, L{size()}
16733 """
16734 pass
16735
16737 """Sets the width (and height) of the channel's textures.
16738
16739 @type Width: int
16740 @rtype: None
16741 @raise ValueError: Raised if the new dimensions of the channel (after setting both the width and height) are invalid.
16742 @note: Textures in channels must always be square, so this will set the height as well as the width.
16743 @see: L{width()}, L{setSize()}, L{height()}, L{setHeight()}, L{size()}
16744 """
16745 pass
16746
16748 """Returns the shader category of the channel.
16749
16750 @rtype: str
16751 @see: L{setShader()}
16752 """
16753 pass
16754
16756 """Returns the width and height of the channel, which must be the same.
16757
16758 @rtype: int
16759 @return: The width and height of the channel, which must be the same
16760 @see: L{width()}, L{setSize()}, L{setWidth()}, L{height()}, L{setHeight()}
16761 """
16762 pass
16763
16765 """Returns the width of the channel's textures.
16766
16767 Textures in channels must always be square, so this will be the same as the height.
16768
16769 @rtype: int
16770 @see: L{setSize()}, L{setWidth()}, L{height()}, L{setHeight()}, L{size()}
16771 """
16772 pass
16773
16775 """Constructor for L{ChannelInfo}.
16776
16777 This class contains the information for creating a new channel. Note that this API is not complete, as not all options are fully supported yet.
16778
16779 @type rName: str
16780 @param rName: Name of the channel. A value exception is raised if this is empty.
16781 @type Width: int
16782 @param Width: The width of the channel's textures in pixels. The default is 4K (4096).
16783 @type Height: int
16784 @param Height: The height of the channel's textures in pixels. The default is 4K (4096).
16785 @type BitDepth: L{Image.Depth}
16786 @param BitDepth: The bit depth of the channel's textures: mari.Image.DEPTH_BYTE (8, the default), mari.Image.DEPTH_HALF (16) or mari.Image.DEPTH_FLOAT (32).
16787 @type Scalar: bool
16788 @param Scalar: True if the channel should be scalar, or False (the default) for color.
16789 @type pFillColor: L{Color}
16790 @param pFillColor: Specifies a color to fill the channel's texture with on creation. If invalid, it uses a default gray.
16791 @type FileSpace: L{Image.FileSpace}
16792 @param FileSpace: The file space the channel will import and export data as: mari.Image.FILESPACE_NORMAL, mari.Image.VECTOR or mari.Image.FILESPACE_VECTOR_Y_FLIP.
16793 @type ColorspaceSettings: L{ColorspaceConfig}
16794 @param ColorspaceSettings: The colorspace settings for color data of the channel.
16795 @type ScalarColorspaceSettings: L{ColorspaceConfig}
16796 @param ScalarColorspaceSettings: The colorspace settings for scalar data of the channel.
16797 @rtype: L{ChannelInfo}
16798 @raise ValueError: Raised if the channel name was empty, or the requested dimensions are not supported.
16799 @raise ValueError: Raised if invalid colorspace configurations were supplied.
16800 @deprecated: The Scalar parameter is no longer used, and will be removed in a future version.
16801 @see: L{mari.Image.Depth}, L{mari.Image.FileSpace}
16802 """
16803 pass
16804
16807 """Adjustable layers can be set to apply an adjustment stack to their image data.
16808
16809 Adjustment stacks can be used to apply a set of adjustment operations to only the image data in the individual layer, without affecting those below it.
16810
16811 This is an abstract class; every layer that is an L{AdjustableLayer} will also be of a further-derived type, such as L{PaintableLayer}.
16812
16813 B{Example Code}
16814
16815 >>> #This example finds adjustmentable layers in the current channel.
16816 >>> import mari
16817 >>> adjustable_layers = []
16818 >>> channel = mari.geo.current().currentChannel()
16819 >>> for layer in channel.layerList():
16820 ... if layer.isAdjustableLayer():
16821 ... adjustable_layers.append(layer)
16822 """
16823
16825 """Returns the adjustment layer stack that is applied to this layers paint image set.
16826
16827 @rtype: L{LayerStack}
16828 @return: Returns a layer stack
16829 @raise RuntimeError: Raised if the layer has no paint adjustment stack.
16830 """
16831 pass
16832
16834 """Indicates whether this layer has an adjustment stack.
16835
16836 @rtype: bool
16837 @return: True is this layer has an adjustment stack
16838 """
16839 pass
16840
16842 """Indicates if the adjustment stack is disabled.
16843
16844 @rtype: bool
16845 @return: False is an adjustment stack is present and disabled.
16846 """
16847 pass
16848
16850 """Creates an adjustment stack on the layer.
16851
16852 @rtype: L{LayerStack}
16853 @return: Returns the created layer stack
16854 @raise RuntimeError: Raised if the layer adjustment stack cannot be create or already exists or the layer is not modifiable.
16855 """
16856 pass
16857
16859 """Removes the adjustment stack from the layer
16860
16861 @rtype: None
16862 @raise RuntimeError: Raised if the layer adjustment stack cannot be removed or does not exist or the layer is not modifiable.
16863 """
16864 pass
16865
16867 """Set the enabled state of the adjustment stack.
16868
16869 @type Enabled: bool
16870 @param Enabled: The enabled state to set the adjustment stack to
16871 @rtype: None
16872 """
16873 pass
16874
16877 """L{Channel} layers add the image output of a L{Channel} into another stack as a layer.
16878
16879 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
16880
16881 You can check for L{ChannelLayer} objects by calling L{Layer.isChannelLayer()}:
16882
16883 B{Example Code}
16884
16885 >>> #This example finds channel layers in the current channel
16886 >>> import mari
16887 >>> channel_layers = []
16888 >>> channel = mari.geo.current().currentChannel()
16889 >>> for layer in channel.layerList():
16890 ... if layer.isChannelLayer():
16891 ... channel_layers.append(layer)
16892 """
16893
16895 """Returns the channel that the layer uses for its data.
16896
16897 @rtype: L{Channel}
16898 @return: The channel that the layer uses for its data
16899 """
16900 pass
16901
16904 """A collection of one or more images or L{Ptex} face textures to be manipulated as a group.
16905
16906 There are two types of image set: traditional UV image sets and L{Ptex} image sets.
16907
16908 In the case of UV image sets, each UV patch on a model will have one associated image per image set. A 4 patch model will have 4 images in each image set.
16909
16910 In the case of L{Ptex} image sets, the image set serves as container for the L{Ptex} pixel data. For L{Ptex} image sets, the concept of UV patches does not apply. Calling any patch-related methods on a L{Ptex} image set will result in exceptions being raised. Also note that any L{Snapshotable} methods aren't currently supported on L{Ptex} image sets, although this may change in future.
16911
16912 L{Image} sets can be manipulated as a whole, allowing the same operations to be performed on multiple images at once.
16913
16914 One image set at a time is nominated as the "current" image set. This is the image set that the user will interact with when painting.
16915
16916 You can access image sets from a L{Layer} - for example: C{layer.imageSet()} (for L{PaintableLayer} objects)
16917
16918 B{Example Code}
16919
16920 >>> # This example obtains the image of UDIM 1001 from the current layer of the current channel
16921 >>> import mari
16922 >>> layer = mari.geo.current().currentChannel().currentLayer()
16923 >>> if layer.isPaintableLayer():
16924 ... image_set = layer.imageSet()
16925 ... image = image_set.image(0)
16926
16927 @cvar SCALE_THE_PATCH: Scale the patch to the size of the image.
16928 @cvar SCALE_THE_IMAGE: Scale the image to the size of the patch.
16929 @group Signals: nameChanged
16930 """
16931
16933 """Specifies options for which item to scale when importing images.
16934 @cvar SCALE_THE_PATCH: Scale the patch to the size of the image.
16935 @cvar SCALE_THE_IMAGE: Scale the image to the size of the patch.
16936 @note: These values are exposed in the parent class, but are also documented here for convenience.
16937 """
16938 SCALE_THE_PATCH = 0
16939 SCALE_THE_IMAGE = 1
16940
16941 SCALE_THE_PATCH = 0
16942 SCALE_THE_IMAGE = 1
16943
16959
16960 SIZE_DOUBLE = -2
16961 SIZE_HALF = -1
16962 SIZE_NULL = 0
16963 SIZE_256 = 256
16964 SIZE_512 = 512
16965 SIZE_1024 = 1024
16966 SIZE_2048 = 2048
16967 SIZE_4096 = 4096
16968 SIZE_8192 = 8192
16969 SIZE_16384 = 16384
16970 SIZE_32768 = 32768
16971
16973 """Adds a key frame.
16974
16975 @type FrameNumber: int
16976 @param FrameNumber: The frame number of the new key frame
16977 @rtype: bool
16978 @return: True if the new key frame was successfully created or already exists, or False otherwise.
16979 """
16980 pass
16981
16983 """Creates a new snapshot of the object.
16984
16985 @type Name: str
16986 @param Name: A descriptive name for this snapshot. There is no restriction on naming convention, so it is recommended to make this clear, such as "new test version".
16987 @type ID: str
16988 @param ID: An optional identifier for this snapshot. This value can be used to group together sets of snapshots, as described in L{Snapshot.setID()}.
16989 @rtype: L{Snapshot}
16990 @return: The newly created snapshot.
16991 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
16992 """
16993 pass
16994
16996 """Deletes the given snapshot.
16997
16998 @type ShotToDelete: L{Snapshot}
16999 @param ShotToDelete: The snapshot to delete
17000 @rtype: None
17001 @raise ValueError: The snapshot provided was invalid, or not owned by this object.
17002 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17003 @warning: This method cannot be undone, so please use caution.
17004 """
17005 pass
17006
17008 """Export the images of the image set to disk.
17009
17010 This internally calls the saveAs method of L{Image}, with the same arguments.
17011
17012 >>> import mari
17013 >>> currentImageSet = mari.geo.current().currentChannel().currentLayer().imageSet()
17014 >>> currentImageSet.exportImages('/tmp/test.$UDIM.tif')
17015
17016 @type PathAndTemplate: str
17017 @param PathAndTemplate: The target path for the export and the template to export the files to. string.
17018 @type Options: int
17019 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
17020 @type FileOptions: variant
17021 @param FileOptions: This is a key/value map of optional parameters passed to the file writer plugin.
17022 @rtype: None
17023 @raise IOError: Raised if there is a problem saving the file.
17024 @raise TypeError: Raised if the options parameter is not a dict.
17025 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17026 """
17027 pass
17028
17030 """Returns the snapshot with the given identifier, if found.
17031
17032 If more than one snapshot with the given identifier exists, the first one will be returned.
17033
17034 @type ID: str
17035 @param ID: The shot identifier to search for
17036 @rtype: L{Snapshot}
17037 @return: The first snapshot with the given identifier, or None
17038 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17039 """
17040 pass
17041
17043 """Returns the number of frames of animations for this image set.
17044
17045 L{Image} sets may be animated. Each image can have multiple frames associated with it.
17046
17047 @rtype: int
17048 @return: The number of frames of animation
17049 """
17050 pass
17051
17052 - def image(self, UVIndex, Frame=-1):
17053 """Returns the image that corresponds to the given UV index.
17054
17055 @type UVIndex: int
17056 @param UVIndex: The UV index of the image to return. You can get a list of the UV indices in use (for all image sets and patches) by calling L{uvIndices()}.
17057 @type Frame: int
17058 @param Frame: The frame to retrieve the image for. If left as the default, -1, it uses the default keyframe.
17059 @rtype: L{Image}
17060 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17061 @deprecated: This method won't be available for L{Ptex} image sets in future.
17062 @see: L{frameCount()}, L{uvIndices()}
17063 """
17064 pass
17065
17067 """Returns the number of images in this image set.
17068
17069 @rtype: int
17070 @return: The number of images that make up this image set
17071 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17072 @deprecated: This method won't be available for L{Ptex} image sets in future.
17073 """
17074 pass
17075
17077 """Returns the list of images for this image set.
17078
17079 As of version 1.4v3, these images are returned in UV index order - the same order as GeoEntity::patches(). Note however that these indices do not necessarily map directly to UDIMs, as some UDIMs may be unused, and there will not be any corresponding spaces left empty in the array. To be sure of the UDIM of a patch, you should instead either call the L{GeoPatch.udim()} function on the patch in the corresponding position in the results of GeoEntity::patches(), or iterate through the UV indices of the image set, where you can reliably add the constant 1001 to each of them to calculate the UDIM. For example:
17080
17081 >>> import mari
17082 >>> layer = mari.geo.current().currentChannel().currentLayer()
17083 >>> result = True
17084 >>> if layer.isPaintableLayer():
17085 ... image_set = layer.imageSet()
17086 ... for index in image_set.uvIndices():
17087 ... result = result and image_set.image(index).saveAs("/tmp/"+str(index + 1001) + '.tif')
17088
17089 Alternatively, you can retrieve a list of all images in an array where the indices match the UV indices (and so can be easily converted to UDIMs) using the function L{uvImageList()}.
17090
17091 @type Frame: int
17092 @param Frame: The frame number to return. If left as the default, -1, the current frame is used.
17093 @rtype: list of L{Image}
17094 @return: A list of the images in this image set
17095 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17096 @note: In versions older than 1.4v3, this function does not necessarily return the images in any particular order, or in the same order as GeoEntity::patches().
17097 @deprecated: This method won't be available for L{Ptex} image sets in future.
17098 @see: L{uvImageList()}
17099 """
17100 pass
17101
17102 - def importImages(self, ImagePaths, ScaleOption, UVIndexList=[], RemoveAlpha=False):
17103 """Imports a set of texture files into the images in the image set.
17104
17105 The file names to import and the images to import them into can be specified in two ways.
17106
17107 To specify a template for the file paths to import from:
17108
17109 >>> import mari
17110 >>> layer = mari.geo.current().currentChannel().currentLayer()
17111 >>> if layer.isPaintableLayer():
17112 ... image_set = layer.imageSet()
17113 ... # To export all images:
17114 ... image_set.importImages('/tmp/filename.$UDIM.tif', image_set.SCALE_THE_IMAGE)
17115 ... # To export images for UV indices 2 and 3: (UDIMs 1003 and 1004)
17116 ... image_set.importImages('/tmp/filename.$UDIM.tif', image_set.SCALE_THE_IMAGE, [2, 3])
17117
17118 To specify the items as a sequence of sequences that each contain an L{Image} object and a source path: (both lists and tuples will work)
17119
17120 >>> image_set.importImages([[image_set.image(0), '/tmp/img0.tif'], [image_set.image(1), '/tmp/img1.tif']],
17121 ... image_set.SCALE_THE_IMAGE)
17122
17123 @type ImagePaths: variant
17124 @param ImagePaths: Specifies the images and file names to import. This parameter can be either a string template containing "$UDIM", or a list of two-element sequences containing an L{Image} object and a path. See above for examples.
17125 @type ScaleOption: L{ScaleChoice}
17126 @param ScaleOption: When the existing patch and the image in the file to import are of different sizes, this indicates which of the two to rescale to match the other
17127 @type UVIndexList: list of int
17128 @param UVIndexList: This parameter can only be used when passing in a string template for the L{ImagePaths} argument. Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
17129 @type RemoveAlpha: bool
17130 @param RemoveAlpha: Remove the alpha channel (convert RGBA to RGB).
17131 @rtype: None
17132 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17133 @raise ValueError: Raised if no image paths were supplied; if the scale option was invalid; if an invalid UV index was specified; or if a non-empty UV index list parameter was supplied, but the image paths parameter was not a string.
17134 @deprecated: This method won't be available for L{Ptex} image sets in future.
17135 """
17136 pass
17137
17139 """Imports a map of texture files into the images in the image set.
17140
17141 The file names to import are specified as a dictionary of target L{Image} objects to image file paths.
17142
17143 >>> image_set.importImages({image_set.image(0): '/tmp/img0.tif', image_set.image(1): '/tmp/img1.tif'},
17144 ... image_set.SCALE_THE_IMAGE)
17145
17146 @type ImagePaths: QMap of L{Image} , str
17147 @param ImagePaths: Specifies the L{Image} objects and file names to import in a dictionary. See the example above.
17148 @type ScaleOption: L{ScaleChoice}
17149 @param ScaleOption: When the existing patch and the image in the file to import are of different sizes, this indicates which of the two to rescale to match the other
17150 @type RemoveAlpha: bool
17151 @param RemoveAlpha: Remove the alpha channel (convert RGBA to RGB).
17152 @rtype: None
17153 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17154 @raise ValueError: Raised if no image paths were supplied; if the scale option was invalid; if an invalid UV index was specified; or if a non-empty UV index list parameter was supplied, but the image paths parameter was not a string.
17155 @deprecated: This method won't be available for L{Ptex} image sets in future.
17156 """
17157 pass
17158
17160 """Indicates whether the image set has an animation.
17161
17162 @rtype: bool
17163 @return: True if this image set has animation - i.e. more than one frame of image data
17164 """
17165 pass
17166
17168 """Indicates whether this image set is a L{Ptex} image set.
17169
17170 @rtype: bool
17171 @return: True if this image set uses per-face L{Ptex} mapping, or False otherwise
17172 """
17173 pass
17174
17176 """Returns the name of the image set.
17177
17178 @rtype: str
17179 @see: L{setName()}
17180 """
17181 pass
17182
17184 """This is emitted after the image set has been renamed.
17185
17186 @type NewName: str
17187 @param NewName: The new name of the image set
17188 @rtype: None
17189 """
17190 pass
17191
17193 """Removes a key frame.
17194
17195 @type FrameNumber: int
17196 @rtype: bool
17197 @return: True if the new key frame was successfully removed or False otherwise.
17198 """
17199 pass
17200
17201 - def resize(self, NewSize, UVIndexList=[]):
17202 """Resize a set of images in the image set.
17203
17204 @type NewSize: L{ImageSet.Size}
17205 @param NewSize: The desired size for the image.
17206 @type UVIndexList: list of int
17207 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify which patches to resize the images of. If not specified or empty, all patches will be resized. The UDIM for a patch is the zero-based UV index plus 1001.
17208 @rtype: None
17209 @raise ValueError: Raised if the size provided was invalid, or if an invalid UV index was specified.
17210 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17211 """
17212 pass
17213
17215 """Reverts the state of the object to that in the given snapshot.
17216
17217 @type OldSnapshot: L{Snapshot}
17218 @param OldSnapshot: A valid snapshot of this object
17219 @rtype: None
17220 @raise ValueError: The snapshot provided was invalid, or not owned by this object.
17221 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17222 """
17223 pass
17224
17226 """Sets a new name for the image set.
17227
17228 @type NewName: str
17229 @param NewName: The new name for the image set
17230 @rtype: None
17231 @raise ValueError: Raised if an image set with the given name already exists on the object.
17232 @see: L{name()}
17233 """
17234 pass
17235
17237 """Returns a list of the snapshots available on the object.
17238
17239 @rtype: list of L{Snapshot}
17240 @return: A list of the available snapshots
17241 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17242 """
17243 pass
17244
17254
17256 """Returns a list of the images for this image set, in UV coordinate order.
17257
17258 This will include some entries with the value None if any UDIM is not used by the model. The advantage of this over the L{imageList()} function is that the index of each image in the return value can be converted to a UDIM by simply adding the constant 1001.
17259
17260 For example:
17261
17262 >>> import mari
17263 >>> layer = mari.geo.current().currentChannel().currentLayer()
17264 >>> result = True
17265 >>> if layer.isPaintableLayer():
17266 ... image_set = layer.imageSet()
17267 ... for index, image in enumerate(image_set.uvImageList()):
17268 ... result = result and image.saveAs('/tmp/{0}.tif'.format(index + 1001))
17269
17270 @type Frame: int
17271 @rtype: list of L{Image}
17272 @return: A list of the images for the image set, with one entry per UV patch position (or UDIM)
17273 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17274 @deprecated: This method won't be available for L{Ptex} image sets in future.
17275 @see: L{imageList()}
17276 """
17277 pass
17278
17280 """Return the UV Index for the given image if it belongs to this image set.
17281
17282 @type UvImage: L{Image}
17283 @param UvImage: The image to find the UV index for
17284 @rtype: int
17285 @return: The UV index of the given image if it belongs to this image set, -1 otherwise
17286 """
17287 pass
17288
17290 """Returns a list of all of the UV indices used by the image set.
17291
17292 The UV indices are integers, but not necessarily consecutive.
17293
17294 @rtype: list of int
17295 @raise NotImplementedError: Raised if the function is called on a L{Ptex} image set.
17296 @deprecated: This method won't be available for L{Ptex} image sets in future.
17297 """
17298 pass
17299
17300
17301 -class PostFilter(PropertySource):
17302 """A post processing, image space color management filter.
17303
17304 Post processing filters can be applied to the canvas display after rendering. These filters can be used for color correction, bloom, or other fancy effects. Filters are written as GLSL shader fragments, and can have uniform values and texture data as well.
17305
17306 L{PostFilter} instances can be created by calling the various "create" functions on a L{PostFilterCollection}.
17307
17308 B{Example Code}
17309
17310 >>> # This examples creates a new FileLUTFilter object through GLRender and PostFilterCollection
17311 >>> import mari
17312 >>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")
17313 >>> file_lut = filter_collection.createFileLUT("New File LUT")
17314 >>> mari.gl_render.deletePostFilterCollection(filter_collection)
17315
17316 @cvar POSTFILTER_ENABLED: Whether the filter is enabled.
17317 @cvar POSTFILTER_REMOVABLE: The filter can be removed by users.
17318 @group Signals: flagsChanged
17319 """
17320
17322 """Specifies the options that can be set on filters.
17323
17324 These options can be combined using binary 'or' operations - for example:
17325
17326 >>> import mari
17327 >>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")
17328 >>> file_lut = filter_collection.createFileLUT("New File LUT")
17329 >>> file_lut.setFlags(file_lut.POSTFILTER_ENABLED | file_lut.POSTFILTER_REMOVABLE)
17330 >>> mari.gl_render.deletePostFilterCollection(filter_collection)
17331
17332 @cvar POSTFILTER_ENABLED: Whether the filter is enabled.
17333 @cvar POSTFILTER_REMOVABLE: The filter can be removed by users.
17334 @note: These values are exposed in the parent class, but are also documented here for convenience.
17335 """
17336 POSTFILTER_ENABLED = 1 << 0
17337 POSTFILTER_REMOVABLE = 1 << 1
17338
17339 POSTFILTER_ENABLED = 1 << 0
17340 POSTFILTER_REMOVABLE = 1 << 1
17341
17342 - def enabled(self):
17343 """Returns whether the filter is enabled.
17344
17345 DEPRICATED: This function will be removed in a future version. Please use 'enabled = (filter.flags() & filter.POSTFILTER_ENABLED) is filter.POSTFILTER_ENABLED'.
17346
17347 @rtype: bool
17348 @return: True if the filter is enabled
17349 @see: L{setEnabled()}
17350 """
17351 pass
17352
17354 """Returns the flags of the filter.
17355
17356 @rtype: int
17357 @return: The flags of the filter. See L{PostFilterFlags}.
17358 @see: L{setFlags()}
17359 """
17360 pass
17361
17362 - def flagsChanged(self, Flags):
17363 """Emitted when the flags changes.
17364
17365 @type Flags: int
17366 @param Flags: The new flags.
17367 @rtype: None
17368 """
17369 pass
17370
17372 """Returns the name of the filter.
17373
17374 @rtype: str
17375 @return: The unique name of the filter
17376 """
17377 pass
17378
17379 - def setEnabled(self, Enabled):
17380 """Used to enables or disable the filter.
17381
17382 DEPRICATED: This function will be removed in a future version. Please use 'filter.setFlags(filter.flags() | filter.POSTFILTER_ENABLED)'.
17383
17384 @type Enabled: bool
17385 @param Enabled: Whether the filter is to be enabled or disabled
17386 @rtype: None
17387 @see: L{enabled()}
17388 """
17389 pass
17390
17391 - def setFlags(self, Flags):
17392 """Modifies the flags of the filter.
17393
17394 @type Flags: int
17395 @param Flags: The flags of the filter. See L{PostFilterFlags}.
17396 @rtype: None
17397 @see: L{flags()}
17398 """
17399 pass
17400
17403 """Graph layers contain an image for each patch that can be painted directly.
17404
17405 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
17406
17407 You can check for L{GraphLayer} objects by calling L{Layer.isGraphLayer()}:
17408
17409 This examples shows how to create a graph layer and checks if it's a graph layer
17410
17411 >>> import mari
17412 >>> channel = mari.geo.current().currentChannel()
17413 >>> graphLayer = channel.createGraphLayer("Test")
17414 >>> graphLayer.isGraphLayer()
17415 True
17416
17417 This examples shows how to create a Perlin node in the graph layer
17418
17419 >>> childNodeGraph = graphLayer.nodeGraph()
17420 >>> perlin = childNodeGraph.createNode("Procedural/Noise/Perlin")
17421 """
17422
17424 """Returns the L{NodeGraph} object contained in this layer.
17425
17426 @rtype: L{NodeGraph}
17427 @return: Return the L{NodeGraph} object contained in this layer.
17428 @raise SystemError: Raised if the layers node graph cannot be found.
17429 """
17430 pass
17431
17434 """BakePoint layers contain an image for each patch that can be painted directly.
17435
17436 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
17437
17438 You can check for L{BakePointLayer} objects by calling L{Layer.isBakePointLayer()}:
17439
17440 This examples shows how to create a Bake Point layer and checks if it's a BakePoint layer
17441
17442 >>> import mari
17443 >>> channel = mari.geo.current().currentChannel()
17444 >>> bakePointLayer = channel.createBakePointLayer("Test")
17445 >>> bakePointLayer.isBakePointLayer()
17446 True
17447 """
17448
17450 """Bakes the result at this layer into the image set.
17451
17452 Bakes the result at this layer into the image set.
17453
17454 The result of baking can be obtained by L{bakedResult()}.
17455
17456 @rtype: None
17457 """
17458 pass
17459
17461 """Returns the image set of baked result.
17462
17463 @rtype: L{ImageSet}
17464 @return: The image set this layer holds as baked result.
17465 @raise RuntimeError: Raised if the image set cannot be found.
17466 """
17467 pass
17468
17470 """Deletes the baked result.
17471
17472 @rtype: None
17473 """
17474 pass
17475
17477 """Returns whether there is baked result.
17478
17479 @rtype: bool
17480 """
17481 pass
17482
17484 """Returns whether the baked result is up to date.
17485
17486 Returns whether the baked result is up to date.
17487
17488 If there is no baked result yet, this will return False.
17489
17490 @rtype: bool
17491 """
17492 pass
17493
17495 """Sets whether this layer should use the baked result if available.
17496
17497 @type UseBaked: bool
17498 @rtype: None
17499 @see: L{useBaked()}
17500 """
17501 pass
17502
17504 """Returns whether this layer should use the baked result or not.
17505
17506 @rtype: bool
17507 @see: L{setUseBaked()}
17508 """
17509 pass
17510
17513 """A geometry patch is section of a L{GeoEntity} that occupies a single UV square.
17514
17515 Geometry can be broken into multiple patches. Each patch may have multiple textures associated with it.
17516
17517 An L{ImageSet} contains one texture for each L{GeoPatch} in a L{GeoEntity}.
17518
17519 Patches may be named, and can have associated metadata. They may also be locked or hidden.
17520
17521 You can access geometry patches through a L{GeoEntity} - for example: C{mari.geo.current().patchList()} B{Example Code}
17522
17523 >>> # This examples obtains the patch with UDIM 1001 of current geometry object
17524 >>> import mari
17525 >>> patch_1001 = mari.geo.current().patch(0)
17526 """
17527
17529 """Returns the locked status of the patch.
17530
17531 @rtype: bool
17532 @return: True if the patch is locked, or False (the default) otherwise
17533 @see: L{setLocked()}
17534 """
17535 pass
17536
17538 """Indicates whether the patch is currently selected.
17539
17540 @rtype: bool
17541 @return: True if the patch is selected, or False if not
17542 """
17543 pass
17544
17546 """Indicates whether the patch is valid.
17547
17548 For a patch to be valid, its U and V location must be greater than zero. Mari does not support negative UVs which lead to invalid patches. If a patch is invalid, L{uvIndex()} may not return a useful index and L{udim()} will return a value less than 1001. Invalid patches may not have images associated with them.
17549
17550 @rtype: bool
17551 @return: True if the patch is valid, or False if not.
17552 @see: L{uvIndex()}, L{udim()}
17553 """
17554 pass
17555
17557 """Returns the visible status of the patch.
17558
17559 @rtype: bool
17560 @return: True if the patch is visible; False if hidden
17561 """
17562 pass
17563
17565 """Returns the name of the patch.
17566
17567 @rtype: str
17568 @return: The name of this patch
17569 @see: L{setName()}
17570 """
17571 pass
17572
17574 """Changes the locked state of the patch.
17575
17576 Patches may be locked to prevent painting on or applying filters to them. They may still be exported when locked.
17577
17578 @type Locked: bool
17579 @param Locked: The new locked status of the Patch. If True, the patch will be locked and cannot be edited
17580 @rtype: None
17581 """
17582 pass
17583
17585 """Sets the name of the patch.
17586
17587 The name is used in the UV view and the patch view.
17588
17589 The default name for a patch is its UDIM.
17590
17591 @type Name: str
17592 @param Name: The new name for the patch
17593 @rtype: None
17594 @see: L{name()}
17595 """
17596 pass
17597
17599 """Changes the selection state of the patch.
17600
17601 @type Selected: bool
17602 @param Selected: True to select the patch, or False to deselect it
17603 @rtype: None
17604 """
17605 pass
17606
17608 """Shows or hides the patch.
17609
17610 @type Visible: bool
17611 @param Visible: True to show the patch, or False to hide it
17612 @rtype: None
17613 """
17614 pass
17615
17617 """Returns the U location of the patch.
17618
17619 @rtype: int
17620 @return: The integer U coordinate of the lower left corner of the patch in UV space
17621 """
17622 pass
17623
17625 """Returns the UDIM of the patch.
17626
17627 UDIM values identify the integer position of a patch in a channel. Each patch represents a square of dimensions 1x1 in U-V space with integer boundaries. There may be up to ten patches across, and any number of patches upwards - so the U index of a patch must be in the range [0, 9], and the V index can be zero or any positive integer.
17628
17629 The UDIM value for a patch can be calculated using the following formula:
17630
17631 C{udim = 1001 + u + (10 * v)}
17632
17633 For example, the UDIM of the bottom left patch, which represents the U-V space region (0, 0) to (1, 1), will be 1001. The next patch to the right of that will have UDIM 1002, and the patch directly above the bottom left will be 1011. If there are ten patches across, the one on the bottom row at the far right, representing the region (9, 0) to (10, 1), will have UDIM 1010.
17634
17635 The U index limit of ten is currently hard-wired.
17636
17637 @rtype: int
17638 @return: The UDIM of the patch, as specified above
17639 """
17640 pass
17641
17643 """Returns the UV location of the patch.
17644
17645 @rtype: QPoint
17646 @return: The integer U and V coordinates of the lower left corner of the patch in UV space
17647 """
17648 pass
17649
17651 """Returns the UV index of the patch.
17652
17653 This provides a 0-based index of the patch, which can be used with L{ImageSet.image()} to find the image in a channel that will be applied to the patch.
17654
17655 The UDIM of the patch will be this value plus 1001.
17656
17657 @rtype: int
17658 @return: The integer UV index of the patch.
17659 """
17660 pass
17661
17663 """Returns the V location of the patch.
17664
17665 @rtype: int
17666 @return: The integer V coordinate of the lower left corner of the patch in UV space
17667 """
17668 pass
17669
17672 """The paint buffer is the screen aligned plane that users paint onto.
17673
17674 It can be accessed from the L{CanvasManager} - for example: C{mari.canvases.paintBuffer()}
17675
17676 B{Example Code}
17677
17678 >>> # This example shows how to set or get the paint buffer depth
17679 >>> import mari
17680 >>> paint_buffer = mari.canvases.paintBuffer()
17681 >>> original_depth = paint_buffer.depth()
17682 >>> paint_buffer.setDepth(8)
17683 >>> paint_buffer.depth()
17684 8
17685 >>> paint_buffer.setDepth(original_depth)
17686
17687 @cvar DEPTH_BYTE: Standard eight bit depth.
17688 @cvar DEPTH_HALF: Half-float depth.
17689 @cvar DEPTH_FLOAT: Full float depth.
17690 @cvar MIRROR_NONE: Default. No mirrored strokes are created.
17691 @cvar MIRROR_X: Paint strokes are mirrored across the middle of the buffer on the x-axis i.e. left to right and right to left.
17692 @cvar MIRROR_Y: Paint strokes are mirrored across the middle of the buffer on the y-axis i.e. top to bottom and bottom to top.
17693 @cvar MIRROR_XY: Paint strokes are mirrored both on the x and y axis.
17694 @group Signals: aboutToBake, aboutToClear, baked, cleared, depthChanged, resolutionChanged, rotationChanged, scaleChanged, translationChanged
17695 """
17696
17698 """Bit depth options for the paint buffer.
17699
17700 The value of each item is the bits per pixel component (r,g,b,a) in the buffer.
17701
17702 Higher bit depths and resolutions require more GPU memory.
17703
17704 @cvar DEPTH_BYTE: Standard eight bit depth.
17705 @cvar DEPTH_HALF: Half-float depth.
17706 @cvar DEPTH_FLOAT: Full float depth.
17707 @note: These values are exposed in the parent class, but are also documented here for convenience.
17708 """
17709 DEPTH_BYTE = 8
17710 DEPTH_HALF = 16
17711 DEPTH_FLOAT = 32
17712
17713 DEPTH_BYTE = 8
17714 DEPTH_HALF = 16
17715 DEPTH_FLOAT = 32
17716
17718 """This enum controls mirroring in the paint buffer.
17719
17720 If enable mirroring repeats the users paint strokes in various different ways in the paint buffer. The default is MIRROR_NONE meaning only the strokes defined by the user are created. Mirroring is useful for painting symmetrical objects.
17721
17722 @cvar MIRROR_NONE: Default. No mirrored strokes are created.
17723 @cvar MIRROR_X: Paint strokes are mirrored across the middle of the buffer on the x-axis i.e. left to right and right to left.
17724 @cvar MIRROR_Y: Paint strokes are mirrored across the middle of the buffer on the y-axis i.e. top to bottom and bottom to top.
17725 @cvar MIRROR_XY: Paint strokes are mirrored both on the x and y axis.
17726 @note: These values are exposed in the parent class, but are also documented here for convenience.
17727 """
17728 MIRROR_NONE = 0
17729 MIRROR_X = 1
17730 MIRROR_Y = 2
17731 MIRROR_XY = 3
17732
17733 MIRROR_NONE = 0
17734 MIRROR_X = 1
17735 MIRROR_Y = 2
17736 MIRROR_XY = 3
17737
17739 """This is emitted just before baking occurs.
17740
17741 @rtype: None
17742 """
17743 pass
17744
17746 """This is emitted just before the paint buffer is cleared.
17747
17748 @rtype: None
17749 """
17750 pass
17751
17753 """Bakes the paint from the buffer down onto the currently selected channel.
17754
17755 @rtype: bool
17756 @return: True if any projection occurred. If the buffer is empty, this will return False
17757 """
17758 pass
17759
17761 """Bakes the paint from the buffer down onto the currently selected channel and then forces it tobe cleared.
17762
17763 @rtype: bool
17764 @return: True if any projection occurred. If the buffer is empty, this will return False
17765 """
17766 pass
17767
17769 """This is emitted just after baking occurs.
17770
17771 @rtype: None
17772 """
17773 pass
17774
17776 """Returns the color clamping behavior of the projector.
17777
17778 @rtype: bool
17779 @return: True if the colors are clamped to the 0..1 range on output
17780 @see: L{setClampColors()}
17781 """
17782 pass
17783
17785 """Clears all paint from the buffer.
17786
17787 @rtype: None
17788 """
17789 pass
17790
17792 """This is emitted just after the paint buffer has been cleared.
17793
17794 @rtype: None
17795 """
17796 pass
17797
17798 - def compImage(self, CompImage, Undoable=True, BlendMode="Normal"):
17799 """@type CompImage: QImage
17800 @type Undoable: bool
17801 @type BlendMode: str
17802 @rtype: None
17803 """
17804 pass
17805
17806 - def compImage(self, CompImage, Undoable=True, BlendMode="Normal"):
17807 """Composits the given image onto the paint buffer.
17808
17809 @type CompImage: L{Image}
17810 @param CompImage: the image to composite onto the paint buffer. This can be either L{Image} or QImage
17811 @type Undoable: bool
17812 @param Undoable: Specifies whether it's possible to undo compositing the image onto the paint buffer
17813 @type BlendMode: str
17814 @param BlendMode: the blend mode to use to composite the image onto the paint buffer
17815 @rtype: None
17816 """
17817 pass
17818
17820 """Returns the current bit depth of the buffer.
17821
17822 @rtype: L{BufferDepth}
17823 @return: The current bit depth
17824 @see: L{setDepth()}
17825 """
17826 pass
17827
17829 """This is emitted when the depth of the buffer is changed.
17830
17831 @type NewDepth: L{PaintBuffer.BufferDepth}
17832 @param NewDepth: The new depth of the paint buffer
17833 @rtype: None
17834 """
17835 pass
17836
17838 """Returns a QImage containing the current paint buffer.
17839
17840 This captures the paint in the paint buffer and returns it as an 8 bit RGBA QImage.
17841
17842 QImage does not support higher bit depths, so any float or half data will be reduced to 8 bits.
17843
17844 @rtype: QImage
17845 @return: A QImage which is the same size as the paint buffer resolution, and contains 8 bit RGBA data
17846 """
17847 pass
17848
17850 """Indicates whether the buffer has paint in it.
17851
17852 @rtype: bool
17853 @return: True if the paint buffer has some paint in it, or False if not
17854 """
17855 pass
17856
17858 """Saves the content of the paint buffer to an L{Image} in the L{ImageManager}.
17859
17860 @type Paint: L{Image}
17861 @param Paint: the L{Image} object to load into the paint buffer
17862 @rtype: None
17863 @raise ValueError: Emitted if the given L{Image} object is not valid.
17864 """
17865 pass
17866
17868 """Return the mirroring mode for the paint buffer.
17869
17870 @rtype: L{Mirroring}
17871 @return: The current mirroring state of the paint buffer
17872 @see: L{setMirroring()}
17873 """
17874 pass
17875
17877 """Pick a color from the paintbuffer.
17878
17879 This allows a script to pick pixel color values from the paintbuffer. The L{x} and L{y} position must be in the range returned by L{resolution()} The color returned may be a HDR value with r,g,b values above 1.0 This method is relatively slow to execute and should not be used to the query lots of pixels
17880
17881
17882 C{#Pick a pixel in the middle of the screen}
17883
17884 C{Size = mari.canvases.paintBuffer().resolution();}
17885
17886 C{c = mari.canvases.paintBuffer().pickColor(Size.width()/2, Size.height()/2)}
17887
17888 C{print c.toString()}
17889
17890 @type x: int
17891 @param x: The L{x} coordinate of the pixel.These coordinates are relative to the top left corner of the canvas
17892 @type y: int
17893 @param y: The L{y} coordinate of the pixel.These coordinates are relative to the top left corner of the canvas
17894 @rtype: L{Color}
17895 @return: The color of the pixel at the paintbuffer location (L{x},L{y})
17896 @raise ValueError: Emitted if x or y are outside of the range (0,0)-resolution()
17897 """
17898 pass
17899
17901 """Returns the current resolution of the buffer.
17902
17903 @rtype: QSize
17904 @return: The current resolution of the paint buffer. This will be one of the values reported by L{supportedResolutions()}
17905 @see: L{setResolution()}
17906 """
17907 pass
17908
17910 """This is emitted when the paint buffer is resized.
17911
17912 @type Resolution: QSize
17913 @param Resolution: The new size of the buffer in pixels
17914 @rtype: None
17915 """
17916 pass
17917
17918 - def restoreContent(self):
17919 """Restores the content of the paint buffer from the special internal clipboard
17920
17921 @rtype: None
17922 @raise RuntimeError: Raised if there is no saved content in the special internal clipboard.
17923 """
17924 pass
17925
17927 """Returns the rotation of the buffer in degrees.
17928
17929 @rtype: float
17930 @return: The angle of rotation of the paint buffer in degrees
17931 @see: L{setRotation()}
17932 """
17933 pass
17934
17936 """This is emitted when the rotation of the paint buffer changes.
17937
17938 @type Angle: float
17939 @param Angle: The new angle of rotation of the paint buffer in degrees
17940 @rtype: None
17941 """
17942 pass
17943
17944 - def saveContent(self):
17945 """Saves the content of the paint buffer to the special internal clipboard.
17946
17947 @rtype: None
17948 """
17949 pass
17950
17952 """Saves the content of the paint buffer to an L{Image} in the L{ImageManager}.
17953
17954 @rtype: L{Image}
17955 @return: the L{Image} object of the saved paint buffer content
17956 """
17957 pass
17958
17960 """Returns the scaling factor of the buffer.
17961
17962 This is independent of the resolution.
17963
17964 @rtype: QSizeF
17965 @return: The scaling factor of the paint buffer in world space
17966 @see: L{setScale()}
17967 """
17968 pass
17969
17971 """This is emitted when the scale of the paint buffer changes.
17972
17973 @type Scale: QSizeF
17974 @param Scale: The new scaling factor of the paint buffer
17975 @rtype: None
17976 """
17977 pass
17978
17980 """Sets the color clamping behavior of the projector.
17981
17982 @type ClampColors: bool
17983 @param ClampColors: True to clamp the colors to the 0..1 range
17984 @rtype: None
17985 @see: L{clampColors()}
17986 """
17987 pass
17988
17990 """Sets the bit depth of the buffer.
17991
17992 This must be one of the options defined in L{BufferDepth}.
17993
17994 @type Depth: L{BufferDepth}
17995 @param Depth: The new bit depth of the buffer
17996 @rtype: None
17997 @see: L{depth()}
17998 """
17999 pass
18000
18002 """Set the mirroring scheme for the paint buffer.
18003
18004 @type Mirror: L{Mirroring}
18005 @param Mirror: The new mirroring mode
18006 @rtype: None
18007 @see: L{mirroring()}, L{Mirroring}
18008 """
18009 pass
18010
18012 """Sets the contents of the paint buffer with a QImage.
18013
18014 This takes an RGBA QImage and copies it into the paint buffer. The QImage must be RGBA and the same resolution as the paint buffer (see L{resolution()}).
18015
18016 8 bit images will be converted to 16 or 32 bit where appropriate.
18017
18018 @type PaintImage: QImage
18019 @param PaintImage: The image to load into the paint buffer
18020 @rtype: bool
18021 @return: True if the paint was updated from the given image, or False otherwise
18022 @raise ValueError: Raised if the image was invalid, or not of the correct resolution.
18023 @attention: Any existing paint will be replaced without warning, so please be careful.
18024 """
18025 pass
18026
18028 """Sets the resolution of the buffer.
18029
18030 This must be one of the resolutions returned by L{supportedResolutions()}.
18031
18032 @type Size: QSize
18033 @rtype: bool
18034 @return: True if the resolution was set, or if the buffer was already the requested size; False if the resolution could not be set for any reason other than not being in the supported list
18035 @raise ValueError: Raised if the requested resolution is not supported.
18036 @see: L{resolution()}
18037 """
18038 pass
18039
18041 """Sets the angle of rotation of the buffer in degrees.
18042
18043 Angles outside the range [0, 360] will be replaced with values wrapped into that range. For example, after calling setRotation(-10), L{rotation()} will return 350.
18044
18045 @type Angle: float
18046 @param Angle: The rotation angle.
18047 @rtype: None
18048 @see: L{rotation()}
18049 """
18050 pass
18051
18053 """Sets the scaling factor of the buffer.
18054
18055 This does not change the resolution.
18056 C{mari.canvases.paintBuffer().setScale(PySide.QtCore.QSizeF(1,1))}
18057
18058 @type Size: QSizeF
18059 @param Size: The new scaling factor of the paint buffer.
18060 @rtype: None
18061 @see: L{scale()}
18062 """
18063 pass
18064
18066 """Sets the translation, or offset from the origin, of the buffer.
18067
18068 C{mari.canvases.paintBuffer().setTranslation(PySide.QtCore.QPointF(0.1,0.1))}
18069
18070 @type Translation: QPointF
18071 @param Translation: The new translation of the paint buffer
18072 @rtype: None
18073 @see: L{translation()}
18074 """
18075 pass
18076
18078 """Returns the list of resolutions that the paint buffer supports.
18079
18080 @rtype: list of QSize
18081 @return: A list of valid resolutions (in pixels) for the paint buffer
18082 """
18083 pass
18084
18086 """Returns the translation, or offset from the origin, of the buffer.
18087
18088 @rtype: QPointF
18089 @return: The translation of the paint buffer in screen coordinates
18090 @see: L{setTranslation()}
18091 """
18092 pass
18093
18095 """This is emitted when the translation of the buffer changes.
18096
18097 @type Translation: QPointF
18098 @param Translation: The new translation of the paint buffer
18099 @rtype: None
18100 """
18101 pass
18102
18105 """These are the locator object in the "Objects" Gui.
18106
18107 @group Signals: nameChanged
18108 """
18109
18111 """Add a locator to this object.
18112
18113 @rtype: L{LocatorEntity}
18114 @return: The newly-created locator.
18115 """
18116 pass
18117
18119 """Hide the locator UI object.
18120
18121 @rtype: None
18122 """
18123 pass
18124
18126 """Indicates whether the object is currently selected.
18127
18128 @rtype: bool
18129 @return: True if the object is selected, or False if not
18130 """
18131 pass
18132
18134 """Returns the name of the object.
18135
18136 @rtype: str
18137 @return: The name of this object
18138 @see: L{setName()}
18139 """
18140 pass
18141
18143 """This is emitted after the entity has been renamed.
18144
18145 @type NewName: str
18146 @param NewName: The new name of the entity
18147 @rtype: None
18148 """
18149 pass
18150
18152 """Changes the name of the object.
18153
18154 @type NewName: str
18155 @param NewName: The new name of the object
18156 @rtype: None
18157 @see: L{name()}
18158 """
18159 pass
18160
18162 """Changes the selection state of the object.
18163
18164 @type Selected: bool
18165 @param Selected: True to select the object, or False to deselect it
18166 @rtype: None
18167 @note: Exactly one object can be selected at a time. If only one object is available, it cannot be deselected.
18168 """
18169 pass
18170
18183
18185 """Show the locator UI object.
18186
18187 @rtype: None
18188 """
18189 pass
18190
18201
18203 """Returns the translation vector at a given frame.
18204
18205 @type Frame: int
18206 @param Frame: L{Frame}
18207 @rtype: L{VectorN}
18208 @return: Vector of the translation.
18209 """
18210 pass
18211
18214 """A specialised selection group that consists of objects."""
18215
18217 """@rtype: list of L{GeoEntity}
18218 @return: A list of the objects associated to this selection group.
18219 """
18220 pass
18221
18224 """L{Shader} layers contain a shader objects in a layer stack.
18225
18226 L{Shader} layers use an internal shader to produce the result.
18227
18228 You can check for L{ShaderLayer} objects by calling L{Layer.isShaderLayer()}:
18229
18230 >>> layer = channel.layer('Layer 2')
18231 >>> if layer.isShaderLayer():
18232 ... print "Found a shader layer"
18233 """
18234
18236 """Returns the shader that is within this layer.
18237
18238 @rtype: L{Shader}
18239 @return: Returns a shader
18240 """
18241 pass
18242
18245 """Adjustment layers modify the data from the layers below them in the layer stack.
18246
18247 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
18248
18249 You can check for L{AdjustmentLayer} objects by calling L{Layer.isAdjustmentLayer()}:
18250
18251 B{Example Code}
18252
18253 >>> #This example finds adjustment layers in the current channel
18254 >>> import mari
18255 >>> adjustment_layers = []
18256 >>> channel = mari.geo.current().currentChannel()
18257 >>> for layer in channel.layerList():
18258 ... if layer.isAdjustmentLayer():
18259 ... adjustment_layers.append(layer)
18260
18261 >>> #This example creates an "Brightness" adjustment layers in the current channel
18262 >>> import mari
18263 >>> channel = mari.geo.current().currentChannel()
18264 >>> layer = channel.createAdjustmentLayer("Brightness","Filter/Brightness")
18265 >>> layer.isAdjustmentLayer()
18266 True
18267 """
18268
18270 """Retrieves the current value of a parameter from this primary adjustment layer.
18271
18272 @type ParameterName: str
18273 @param ParameterName: The name of the parameter to inspect
18274 @rtype: variant
18275 @return: The current value of the parameter
18276 @raise ValueError: Raised if name of the parameter does not match any existing items.
18277 @see: L{setPrimaryAdjustmentParameter()}
18278 """
18279 pass
18280
18282 """Retrieves the current value of a parameter from this primary adjustment layer and, if possible, return the L{Image} it relates to.
18283
18284 @type ParameterName: str
18285 @param ParameterName: The name of the parameter to inspect.
18286 @rtype: L{Image}
18287 @return: L{Image} of the parameter. None if not image is assigned.
18288 @raise ValueError: Raised if name of the parameter does not match any existing items.
18289 @see: L{getPrimaryAdjustmentParameter()}
18290 """
18291 pass
18292
18294 """Retrieves the current value of a parameter from this secondary adjustment layer.
18295
18296 @type ParameterName: str
18297 @param ParameterName: The name of the parameter to inspect.
18298 @rtype: variant
18299 @return: The current value of the parameter.
18300 @raise ValueError: Raised if name of the parameter does not match any existing items.
18301 @raise RuntimeError: Raised if the layer has no secondary adjustment.
18302 @see: L{setSecondaryAdjustmentParameter()}
18303 """
18304 pass
18305
18307 """Retrieves the current value of a parameter from this primary secondary layer and, if possible, return the L{Image} it relates to.
18308
18309 @type ParameterName: str
18310 @param ParameterName: The name of the parameter to inspect.
18311 @rtype: L{Image}
18312 @return: L{Image} of the parameter. None if not image is assigned.
18313 @raise ValueError: Raised if name of the parameter does not match any existing items.
18314 @see: L{getSecondaryAdjustmentParameter()}
18315 """
18316 pass
18317
18319 """Indicates whether this adjustment layer has a secondary adjustment.
18320
18321 @rtype: bool
18322 @return: True is this layer has a secondary adjustment
18323 """
18324 pass
18325
18327 """Makes a secondary adjustment on this adjustment layer.
18328
18329 @type AdjustmentKey: str
18330 @param AdjustmentKey: the path key of the type of the adjustment to create
18331 @rtype: None
18332 @raise ValueError: Raised if adjustment key parameter does not match any valid value
18333 @raise RuntimeError: Raised if the secondary adjustment cannot be create or already exists. Or the layer is not modifiable.
18334 """
18335 pass
18336
18338 """Get the name of the primary adjustment type.
18339
18340 @rtype: str
18341 @return: The name of the type of primary adjustment, which will be of the form C{'Brightness.adjustment'}
18342 @deprecated: Please use the more reliable function L{primaryAdjustmentType()} instead.
18343 """
18344 pass
18345
18347 """Returns the list of parameters on this primary adjustment layer.
18348
18349 @rtype: list of str
18350 @return: A list of the parameter names for this primary adjustment layer
18351 """
18352 pass
18353
18355 """Returns the name of the primary adjustment type.
18356
18357 @rtype: str
18358 @return: The name of the type of primary adjustment, which will be of the form C{'Filter/Brightness'}
18359 """
18360 pass
18361
18363 """Removes a secondary adjustment on this adjustment layer.
18364
18365 @rtype: None
18366 @raise RuntimeError: Raised if the secondary adjustment cannot be removed or does not exist. Or the layer is not modifiable.
18367 """
18368 pass
18369
18371 """Get the name of the secondary adjustment type.
18372
18373 @rtype: str
18374 @return: The name of the type of secondary adjustment, which will be of the form C{'Brightness.adjustment'}
18375 @raise RuntimeError: Raised if the layer has no secondary adjustment.
18376 @deprecated: Please use the more reliable function L{secondaryAdjustmentType()} instead.
18377 """
18378 pass
18379
18381 """Returns the list of parameters on this secondary adjustment layer.
18382
18383 @rtype: list of str
18384 @return: A list of the parameter names for this secondary adjustment layer.
18385 @raise RuntimeError: Raised if the layer has no secondary adjustment.
18386 """
18387 pass
18388
18390 """Returns the name of the secondary adjustment type.
18391
18392 @rtype: str
18393 @return: The name of the type of secondary adjustment, which will be of the form C{'Filter/Brightness'}
18394 @raise RuntimeError: Raised if the layer has no secondary adjustment.
18395 """
18396 pass
18397
18399 """Sets the value of a parameter on the primary adjustment.
18400
18401 @type ParameterName: str
18402 @param ParameterName: The name of the parameter to modify
18403 @type NewValue: variant
18404 @param NewValue: The new value for the parameter. This can be of a variety of types.
18405 @rtype: None
18406 @raise ValueError: Raised if the parameter could not be found, or was invalid.
18407 @see: L{getPrimaryAdjustmentParameter()}
18408 """
18409 pass
18410
18412 """Sets the value of a parameter on the secondary adjustment.
18413
18414 @type ParameterName: str
18415 @param ParameterName: The name of the parameter to modify.
18416 @type NewValue: variant
18417 @param NewValue: The new value for the parameter. This can be of a variety of types.
18418 @rtype: None
18419 @raise ValueError: Raised if the parameter could not be found, or was invalid.
18420 @raise RuntimeError: Raised if the layer has no secondary adjustment.
18421 @see: L{getSecondaryAdjustmentParameter()}
18422 """
18423 pass
18424
18427 """Handles settings used to project the paint buffer into a scene."""
18428
18430 """Returns the current paint compositing mode.
18431
18432 @rtype: str
18433 @return: The current painting mode as a string, such as 'Multiply' or 'Lighten'.
18434 @see: L{setPaintingMode()}
18435 """
18436 pass
18437
18439 """Returns the list of possible painting modes.
18440
18441 @rtype: list of str
18442 @return: The list of possible painting modes.
18443 """
18444 pass
18445
18447 """Sets the paint compositing mode of projection.
18448
18449 @type PaintingMode: str
18450 @param PaintingMode: The new painting mode as a string, such as 'Multiply' or 'Lighten'. See the GUI for a full list of available painting modes.
18451 @rtype: None
18452 @raise ValueError: Raised if the specified mode is unknown.
18453 @see: L{paintingMode()}
18454 """
18455 pass
18456
18457 projection = ProjectionManager()
18461 """A copy of the state of a channel at a particular time.
18462
18463 By creating snapshots, users can easily preserve the state of an object and return to that state at some later time.
18464
18465 For example, this could be used to preserve the history of a design, or to try new ideas without risking the current textures. The user could snapshot the current state, paint some modifications, ask for approval, and if the changes are not accepted, quickly and easily revert to the previous state.
18466
18467 B{Example Code}
18468
18469 >>> # This example shows how to obtain the current channel of the current GeoEntity object
18470 >>> import mari
18471 >>> channel = mari.geo.current().currentChannel()
18472 >>> channel_snapshot = channel.createSnapshot("Test Snapshot")
18473 """
18474
18476 """Extracts the snapshot into a new channel.
18477
18478 @type NewChannelName: str
18479 @param NewChannelName: The name to give the new channel. This must be unique on the L{GeoEntity}.
18480 @rtype: None
18481 @raise ValueError: Raised if the channel name was empty or not unique for the object.
18482 """
18483 pass
18484
18487 """This object handles the list of canvases, or viewports, available in the project.
18488
18489 B{Example Code:}
18490
18491 >>> # This example shows how to access the current canvas object and to print canvas size to the application log
18492 >>> import mari
18493 >>> canvas = mari.canvases.current()
18494 >>> mari.app.log(str(canvas.size()))
18495
18496 >>> # This example show hot obtain the list of canvases
18497 >>> import mari
18498 >>> canvases = mari.canvases.list()
18499
18500 @group Signals: aboutToRenderCanvas, renderError, renderedCanvas
18501 """
18502
18504 """This is emitted when a canvas is about to be drawn.
18505
18506 @type CanvasToDraw: L{Canvas}
18507 @param CanvasToDraw: The canvas about to be drawn
18508 @rtype: None
18509 """
18510 pass
18511
18513 """Returns the interface to the current canvas.
18514
18515 @rtype: L{Canvas}
18516 @return: The currently active canvas, or None if no canvas is active.
18517 """
18518 pass
18519
18521 """Returns the current frame rate.
18522
18523 @rtype: float
18524 @return: The rate at which the canvas is being updated, in frames per second
18525 """
18526 pass
18527
18529 """Returns a list of the available canvases as L{Canvas} objects.
18530
18531 @rtype: list of L{Canvas}
18532 @return: A list of objects describing the available canvases
18533 """
18534 pass
18535
18537 """Returns the current paint buffer.
18538
18539 The paint buffer is the transparent, screen-aligned plane that users paint into.
18540
18541 @rtype: L{PaintBuffer}
18542 @return: The current paint buffer
18543 """
18544 pass
18545
18547 """This is emitted whenever a rendering error occurs in one of the canvases.
18548
18549 @type ErrorCanvas: L{Canvas}
18550 @param ErrorCanvas: The canvas where the errors have occurred
18551 @type ErrorMessages: list of str
18552 @param ErrorMessages: The descriptions of the errors that have occurred
18553 @rtype: None
18554 """
18555 pass
18556
18558 """This is emitted when a canvas has just been drawn.
18559
18560 @type CanvasDrawn: L{Canvas}
18561 @param CanvasDrawn: The canvas about to be drawn
18562 @rtype: None
18563 """
18564 pass
18565
18567 """Toggles shader compilation on the canvas.
18568
18569 The canvas rendering uses a shader and it gets compiled on occasions. L{Shader} compilation can be expensive, so it is useful to pause shader compilation during long operation such as baking nodes, flattening layers or converting procedural to paintable. This function provides the ability to pause and unpause shader compilation on the canvas.
18570
18571 @type Pause: bool
18572 @param Pause: Flag to pause shader compilation.
18573 @rtype: None
18574 """
18575 pass
18576
18578 """Returns the dimensions of every canvas, in pixels.
18579
18580 All canvases have the same dimensions, so the function L{Canvas.size()} will return the same value.
18581
18582 @rtype: list of int
18583 @return: The dimensions of every canvas, in pixels, in the format: (width, height)
18584 """
18585 pass
18586
18587 canvases = CanvasManager()
18591 """Group layers contain a stack of other layers to be processed as a separate unit.
18592
18593 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
18594
18595 You can check for L{GroupLayer} objects by calling L{Layer.isGroupLayer()}:
18596
18597 B{Example Code}
18598
18599 >>> #This example finds group layers in the current channel.
18600 >>> import mari
18601 >>> group_layers = []
18602 >>> channel = mari.geo.current().currentChannel()
18603 >>> for layer in channel.layerList():
18604 ... if layer.isGroupLayer():
18605 ... group_layers.append(layer)
18606 """
18607
18609 """Flattens the layer group to a single layer.
18610
18611 @rtype: None
18612 """
18613 pass
18614
18616 """Returns the layer stack that is grouped within this layer.
18617
18618 @rtype: L{LayerStack}
18619 @return: Returns a layer stack
18620 """
18621 pass
18622
18625 """A specialised selection group that consists of patches."""
18626
18628 """@rtype: list of L{GeoPatch}
18629 @return: A list of the UV patch objects associated to this selection group.
18630 """
18631 pass
18632
18635 """A post processing filter that reads a 1D LUT from a file.
18636
18637 L{FileLUTFilter} objects can be created by calling L{PostFilterCollection.createFileLUT()}.
18638
18639 B{Example Code}
18640
18641 >>> # This examples creates a new FileLUTFilter object through GLRender and PostFilterCollection
18642 >>> import mari
18643 >>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")
18644 >>> file_lut = filter_collection.createFileLUT("New File LUT")
18645 >>> mari.gl_render.deletePostFilterCollection(filter_collection)
18646 """
18647
18649 """Returns the file path of the LUT.
18650
18651 @rtype: str
18652 @return: The current file path to read the LUT from.
18653 @see: L{setFilePath()}
18654 """
18655 pass
18656
18658 """Sets the file path of the LUT.
18659
18660 @type FilePath: str
18661 @param FilePath: The new file path to read the LUT from.
18662 @rtype: None
18663 @see: L{filePath()}
18664 """
18665 pass
18666
18667
18668 -class ParticleOp(PropertySource):
18669 """Provides L{Particle} operations chain scripting."""
18670
18671 - def description(self):
18672 """Returns a brief description of the operations chain.
18673
18674 @rtype: str
18675 @return: A string containing the description.
18676 """
18677 pass
18678
18679 - def execute(self):
18680 """Executes the operations chain.
18681
18682 @rtype: bool
18683 @return: True if all operations completed successfully, False otherwise.
18684 """
18685 pass
18686
18688 """Returns the name of the operations chain.
18689
18690 @rtype: str
18691 @return: A string containing the name.
18692 """
18693 pass
18694
18696 """Returns the properties widget for the operations chain.
18697
18698 @rtype: QWidget
18699 @return: A widget with all operations properties exposed as a number of sub-widgets.
18700 """
18701 pass
18702
18705 """This is the interface for creating, traversing and destroying layers on any part of the layer system that has layer stacks.
18706
18707 This is the interface for creating, traversing and destroying layers on any part of the layer system that has layer stacks. Obtain these using methods on the relevant interfaces that return L{LayerStack}. For example: C{layer.makeMaskStack()} B{Example Code}
18708
18709 >>> # This example creates a mask stack and returns the mask stack
18710 >>> import mari
18711 >>> current_layer = mari.geo.current().currentChannel().currentLayer()
18712 >>> mask_stack = current_layer.makeMaskStack()
18713
18714 @cvar DEFAULT_CLEAR_SELECTION_FLAGS: All other options are turned off.
18715 @cvar CLEAR_GROUPS: Recursively unselects the sub-layers of any child group layers.
18716 @cvar CLEAR_ADJUSTMENT_STACKS: Recursively unselects the sub-layers of any child adjustment stacks.
18717 @cvar CLEAR_MASK_STACKS: Recursively unselects the sub-layers of any child mask stacks.
18718 @cvar DEFAULT_LAYER_CREATE_FLAGS: All other options are turned off.
18719 @cvar CLEAR_CURRENT_LAYER_SELECTION: Deselect all layers presently selected in this stack.
18720 @cvar SELECT_NEW_LAYERS: Select the newly created layers.
18721 @cvar MAKE_NEW_LAYER_CURRENT: Set the newly created layer as the current layer.
18722 @cvar INSERT_NEW_LAYER_ABOVE_SELECTION: Inserts the newly created layer above the top-most selected layer in the stack.
18723 @cvar INSERT_NEW_LAYER_BELOW_REF_LAYER: Inserts the newly created layer below the given RefLayer in the stack.
18724 @cvar OPTION_NOT_SPECIFIED: Use a default option.
18725 @cvar UPDATE_LAYERS: Update (overwrite) existing layers with new data from the imported files.
18726 @cvar CREATE_NEW_LAYERS: Always create new layers and do not update any existing ones.
18727 @cvar SKIP_LAYERS: Ignore any layers being imported that match existing layers.
18728 """
18729
18735
18736 DEFAULT_CLEAR_SELECTION_FLAGS = 0
18737 CLEAR_GROUPS = 1 << 0
18738 CLEAR_ADJUSTMENT_STACKS = 1 << 1
18739 CLEAR_MASK_STACKS = 1 << 2
18740
18748
18749 DEFAULT_LAYER_CREATE_FLAGS = 1 << 0
18750 CLEAR_CURRENT_LAYER_SELECTION = 1 << 1
18751 SELECT_NEW_LAYERS = 1 << 2
18752 MAKE_NEW_LAYER_CURRENT = 1 << 3
18753 INSERT_NEW_LAYER_ABOVE_SELECTION = 1 << 4
18754 INSERT_NEW_LAYER_BELOW_REF_LAYER = 1 << 5
18755
18757 """These options determine how to handle importing layers with names that match existing ones.
18758 @cvar OPTION_NOT_SPECIFIED: Use a default option.
18759 @cvar UPDATE_LAYERS: Update (overwrite) existing layers with new data from the imported files.
18760 @cvar CREATE_NEW_LAYERS: Always create new layers and do not update any existing ones.
18761 @cvar SKIP_LAYERS: Ignore any layers being imported that match existing layers.
18762 @note: These values are exposed in the parent class, but are also documented here for convenience.
18763 """
18764 OPTION_NOT_SPECIFIED = 0
18765 UPDATE_LAYERS = 1
18766 CREATE_NEW_LAYERS = 2
18767 SKIP_LAYERS = 3
18768
18769 OPTION_NOT_SPECIFIED = 0
18770 UPDATE_LAYERS = 1
18771 CREATE_NEW_LAYERS = 2
18772 SKIP_LAYERS = 3
18773
18775 """Deselects all currently selected layers in the hierarchy of the stack.
18776
18777 @type Flags: int
18778 @param Flags: Values of L{ClearSelectionFlag} or'ed together.
18779 @rtype: None
18780 """
18781 pass
18782
18784 """Returns a new adjustment layer that has been created on layer stack.
18785
18786 @type LayerName: str
18787 @param LayerName: the name of the layer to create.
18788 @type PrimaryAdjustmentKey: str
18789 @param PrimaryAdjustmentKey: The path key of the type of the primary adjustment to create.
18790 @type RefLayer: L{Layer}
18791 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18792 @type Flags: int
18793 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18794 @rtype: L{Layer}
18795 @return: The newly created adjustment layer.
18796 @raise ValueError: Raised if adjustment key parameter does not match any valid value. Or if the reference layer is not in this stack.
18797 """
18798 pass
18799
18801 """Returns a new bake point layer that has been created on layer stack.
18802
18803 @type LayerName: str
18804 @param LayerName: The name of the layer to create.
18805 @type RefLayer: L{Layer}
18806 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18807 @type Flags: int
18808 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18809 @rtype: L{Layer}
18810 @return: The newly created bake point layer.
18811 @raise ValueError: Raised if the reference layer is not in this stack.
18812 @raise RuntimeError: Raised if the experimental bake point layer feature is not enabled.
18813 """
18814 pass
18815
18817 """Returns a new channel layer that has been created on layer stack.
18818
18819 @type LayerName: str
18820 @param LayerName: the name of the layer to create.
18821 @type TargetChannel: L{Channel}
18822 @param TargetChannel: The channel to use.
18823 @type RefLayer: L{Layer}
18824 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18825 @type Flags: int
18826 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18827 @rtype: L{Layer}
18828 @return: The newly-created channel layer.
18829 @raise ValueError: Raised if channel parameter is not valid, or if the reference layer is not in this stack.
18830 """
18831 pass
18832
18834 """Returns a new graph layer that has been created on layer stack.
18835
18836 @type LayerName: str
18837 @param LayerName: The name of the layer to create.
18838 @type RefLayer: L{Layer}
18839 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18840 @type Flags: int
18841 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18842 @rtype: L{Layer}
18843 @return: The newly created graph layer.
18844 @raise ValueError: Raised if the reference layer is not in this stack.
18845 """
18846 pass
18847
18849 """Returns a new group layer that has been created on layer stack.
18850
18851 @type LayerName: str
18852 @param LayerName: The name of the layer to create.
18853 @type RefLayer: L{Layer}
18854 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18855 @type Flags: int
18856 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18857 @rtype: L{Layer}
18858 @return: The newly created group layer.
18859 @raise ValueError: Raised if the reference layer is not in this stack.
18860 """
18861 pass
18862
18864 """Returns a new paintable layer that has been created on layer stack.
18865
18866 @type LayerName: str
18867 @param LayerName: The name of the layer to create.
18868 @type RefLayer: L{Layer}
18869 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack
18870 @type FillColor: L{Color}
18871 @param FillColor: The color the layer is initially set to.
18872 @type Flags: int
18873 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18874 @rtype: L{Layer}
18875 @return: The newly created paintable layer.
18876 @raise ValueError: Raised if the reference layer is not in this stack.
18877 """
18878 pass
18879
18881 """Returns a new procedural layer that has been created on layer stack.
18882
18883 To get a list of the available types of procedural layers to create, call L{Channel.proceduralLayerTypeList()}.
18884
18885 For example:
18886
18887 >>> import mari
18888 >>> channel = mari.geo.current().currentChannel()
18889 >>> procedural_layer_type_list = channel.proceduralLayerTypeList()
18890
18891 @type LayerName: str
18892 @param LayerName: The name of the layer to create.
18893 @type ProceduralKey: str
18894 @param ProceduralKey: The path key of the type of the procedural to create
18895 @type RefLayer: L{Layer}
18896 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18897 @type Flags: int
18898 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18899 @rtype: L{Layer}
18900 @return: The newly created procedural layer.
18901 @raise ValueError: Raised if procedural key parameter does not match any valid value. Or if the reference layer is not in this stack.
18902 """
18903 pass
18904
18906 """Returns a new shader layer that has been created on layer stack.
18907
18908 @type LayerName: str
18909 @param LayerName: the name of the layer to create.
18910 @type TargetShader: L{Shader}
18911 @param TargetShader: The shader to use.
18912 @type RefLayer: L{Layer}
18913 @param RefLayer: The layer to create the new layer above. If None then the new layer is created at the top of the layer stack.
18914 @type Flags: int
18915 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18916 @rtype: L{Layer}
18917 @return: The newly-created channel layer.
18918 @raise ValueError: Raised if channel parameter is not valid, or if the reference layer is not in this stack.
18919 @see: L{GeoEntity.createDiffuseSpecularShader()}, L{GeoEntity.createLayeredShader()}, L{mari.examples.shaderstacks.createShaderStacks()}, L{GeoEntity.createStandaloneShader()}, L{GeoEntity.createShader()}
18920 """
18921 pass
18922
18924 """Creates copies of the given layers within the layer stack.
18925
18926 @type LayersToDuplicate: list of L{Layer}
18927 @param LayersToDuplicate: The list of layers to create copies of. If empty all currently selected layers will be used.
18928 @type RefLayer: L{Layer}
18929 @param RefLayer: The reference layer, above which the new layer is created. If None then the layers are added to the top of this stack.
18930 @type Flags: int
18931 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
18932 @rtype: list of L{Layer}
18933 @return: The newly created layer copies.
18934 @raise ValueError: Raised if the layers to duplicate or the reference layer are not in this stack.
18935 """
18936 pass
18937
18939 """Exports a set of images from the layer stack.
18940
18941 This is the same as selecting "Export All Layers" from the GUI within the given layer stack. To export an individual layer, call L{PaintableLayer.exportImages()} or L{ProceduralLayer.exportImages()}.
18942
18943 Pass in the path and template to export the files to - for example:
18944
18945 >>> import mari
18946 >>> channel = mari.geo.current().currentChannel()
18947 >>> channel.exportImages('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
18948
18949 Pass in the path and template to export the files to and two options - for example:
18950
18951 >>> import mari
18952 >>> channel = mari.geo.current().currentChannel()
18953 >>> channel.exportImages('/tmp/$CHANNEL.$LAYER.$UDIM.tif', 0, [], {'A' : 'B', 'C' : 'D'})
18954
18955 @type PathAndTemplate: str
18956 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
18957 @type Options: int
18958 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
18959 @type UVIndexList: list of int
18960 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
18961 @type FileOptions: variant
18962 @param FileOptions: This is a key/value map of optional parameters passed to the file writer plugin
18963 @rtype: None
18964 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
18965 @raise RuntimeError: Raised if the stack contains multiple layers, but the export was not to a layered format and the template did not contain $LAYER. This would otherwise write the same file multiple times.
18966 @raise IOError: Raised if an error occurred with the export process.
18967 @see: L{exportImagesFlattened()}, L{PaintableLayer.exportImages()}, L{ProceduralLayer.exportImages()}, L{importImages()}
18968 """
18969 pass
18970
18972 """Exports a set of images from the flattened contents of the layer stack.
18973
18974 This is the same as selecting "Export All Layers Flattened" from the GUI within the given layer stack. It bakes the contents of the layer stack into a single temporary image for each patch, and then exports those.
18975
18976 Pass in the path and template to export the files to - for example:
18977
18978 >>> import mari
18979 >>> channel = mari.geo.current().currentChannel()
18980 >>> channel.exportImagesFlattened('/tmp/$CHANNEL.$UDIM.tif')
18981
18982 Some file specific options can be passed via FilOptions - for example :
18983
18984 >>> import mari
18985 >>> channel = mari.geo.current().currentChannel()
18986 >>> channel.exportImagesFlattened('/tmp/$CHANNEL.$UDIM.exr',0,[],{"compression":"zip"})
18987
18988 For OpenEXR files, L{FileOptions} uses the "compression" method as an option for selecting which compression type is used. The following values are accepted as OpenEXR "compression" options.
18989 - 'none' : 'none'
18990 - 'Zip (1 scanline)' : 'zips'
18991 - 'Zip (16 scanlines)' : 'zip'
18992 - 'PIZ Wavelet (32 scanlines)' :'piz'
18993 - 'RLE' : 'rle'
18994 - 'B44': 'b44'
18995 - 'B44A': 'b44a'
18996 - 'DWAA': 'dwaa'
18997 - 'DWAB': 'dwab'
18998
18999 Note that both the long and short names for the compression method are accepted. Either of the following lines will set the compression type to Zip (16 scanlines).
19000
19001 >>> channel.exportImagesFlattened('/tmp/$CHANNEL.$UDIM.exr',0,[],{"compression":"zip"})
19002
19003 >>> channel.exportImagesFlattened('/tmp/$CHANNEL.$UDIM.exr',0,[],{"compression":"Zip (16 scanlines)"})
19004
19005 @type PathAndTemplate: str
19006 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
19007 @type Options: int
19008 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
19009 @type UVIndexList: list of int
19010 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
19011 @type FileOptions: variant
19012 @param FileOptions: This is a key/value map of optional parameters passed to the file writer plugin
19013 @rtype: None
19014 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
19015 @raise IOError: Raised if an error occurred with the export process.
19016 @see: L{exportSelectedPatches()}, L{exportImages()}, L{importImages()}, L{exportSelectedPatchesFlattened()}
19017 """
19018 pass
19019
19021 """Exports images from the selected patches.
19022
19023 This is the same as selecting "Export All Layers" from the GUI within the given layer stack. To export an individual layer, call L{PaintableLayer.exportImages()} or L{ProceduralLayer.exportImages()}. Images will only be exported for patches that are currently selected.
19024
19025 Pass in the path and template to export the files to - for example:
19026
19027 >>> channel.exportSelectedPatches('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
19028
19029 @type PathAndTemplate: str
19030 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
19031 @type Options: int
19032 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
19033 @type FileOptions: variant
19034 @param FileOptions: This is a key/value map of optional parameters passed to the file writer plugin
19035 @rtype: None
19036 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
19037 @raise RuntimeError: Raised if the stack contains multiple layers, but the export was not to a layered format and the template did not contain $LAYER. This would otherwise write the same file multiple times.
19038 @raise IOError: Raised if an error occurred with the export process.
19039 @see: L{exportImagesFlattened()}, L{ProceduralLayer.exportImages()}, exportPaintableLayer.exportImages(), L{importImages()}, L{exportSelectedPatchesFlattened()}
19040 """
19041 pass
19042
19044 """Exports the selected patches with the layer stack flattened.
19045
19046 This is the same as selecting "Export All Layers Flattened" from the GUI within the given layer stack. It bakes the contents of the layer stack into a single temporary image for each selected patch, and then exports those.
19047
19048 Pass in the path and template to export the files to - for example:
19049
19050 >>> channel.exportSelectedPatchesFlattened('/tmp/$CHANNEL.$UDIM.tif')
19051
19052 @type PathAndTemplate: str
19053 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
19054 @type Options: int
19055 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
19056 @type FileOptions: variant
19057 @param FileOptions: This is a key/value map of optional parameters passed to the file writer plugin
19058 @rtype: None
19059 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
19060 @raise IOError: Raised if an error occurred with the export process.
19061 @see: L{exportSelectedPatches()}, L{exportImages()}, L{importImages()}
19062 """
19063 pass
19064
19066 """Returns the layer with the given name.
19067
19068 @type LayerName: str
19069 @rtype: L{Layer}
19070 @return: The requested layer. Return None is not found.
19071 """
19072 pass
19073
19075 """Creates a new group layer on the layer stack and adds the given layers to it.
19076
19077 If an empty layer list is given then a new group layer won't be created.
19078
19079 @type LayersToGroup: list of L{Layer}
19080 @param LayersToGroup: The list of layers to add to the new group. If empty all currently selected layers will be used.
19081 @type RefLayer: L{Layer}
19082 @param RefLayer: The reference layer, above which the new layer is created. If None then the layer is added to the top of this stack.
19083 @type LayerName: str
19084 @param LayerName: The name of the layer to create. If empty a unique name will be auto-generated for the layer.
19085 @type Flags: int
19086 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
19087 @rtype: L{Layer}
19088 @return: The newly created group layer.
19089 @raise ValueError: Raised if the layers to group or the reference layer are not in this stack.
19090 """
19091 pass
19092
19093 - def hash(self, UVIndex=-1):
19094 """Returns a unique identifier for this layer stack.
19095
19096 This hash is assumed to be universally unique (256bit skein hash). This can be used to determine if a layer stack or its children have changedsince some given checkpoint. A different hash means a different layer or children. This hash is based on image data, blend mode, parameters and anything that might effect the pixel output. Use this to detect any changes to the layers.
19097
19098 @type UVIndex: int
19099 @param UVIndex: The UV index of the patch to return the hash of, or -1 to return the hash of all the patches.
19100 @rtype: str
19101 @return: A hash string that uniquely identifies this version of this layer stack and its childrens, or an empty string on failure.
19102 @see: L{imageHash()}
19103 """
19104 pass
19105
19107 """Returns a unique identifier for this layer stack's image data.
19108
19109 This hash is assumed to be universally unique (256bit skein hash). This can be used to determine if a layer stack or its children have changed their image data since some given checkpoint. A different hash means a different layer or children. This hash is only based on image data and can be used to detect changes in the images.
19110
19111 @type UVIndex: int
19112 @param UVIndex: The UV index of the patch to return the hash of, or -1 to return the hash of all the patches.
19113 @rtype: str
19114 @return: A hash string that uniquely identifies this version of this layer stack and its childrens image data, or an empty string on failure.
19115 @see: L{hash()}
19116 """
19117 pass
19118
19120 """Imports a set of images into the layer stack.
19121
19122 This is the same as selecting "Import into Layer Stack" from the GUI. To import into an individual layer, call L{PaintableLayer.importImages()}.
19123
19124 Pass in the path to the files and the template to import them from - for example:
19125
19126 >>> channel.importImages('/tmp/$CHANNEL.$UDIM.psd')
19127
19128 @type PathAndTemplate: str
19129 @param PathAndTemplate: The path to the files and the template to import them from, in a single string.
19130 @type ScaleOption: L{ImageSet.ScaleChoice}
19131 @param ScaleOption: When the existing patch and the image in the file to import are of different sizes, this indicates which of the two to rescale to match the other
19132 @type MatchingLayersOption: L{LayerImportOption}
19133 @param MatchingLayersOption: Determines what to do when the current layer stack and the layers being imported contain matching layer names, where the types of both layers match. This is the most common case. The default is to update the existing layers.
19134 @type MismatchingLayersOption: L{LayerImportOption}
19135 @param MismatchingLayersOption: Determines what to do when the current layer stack and the layers being imported contain matching layer names, where the types of the existing layers and those being imported do not match. This can happen when an exported file contains procedural layers baked as paintable, for example. The default is to skip the mismatching layers.
19136 @type UVIndexList: list of int
19137 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
19138 @type RemoveAlpha: bool
19139 @param RemoveAlpha: Remove the alpha channel (convert RGBA to RGB).
19140 @rtype: None
19141 @raise ValueError: Raised if the path and template parameter was empty, or if one or both of the matching and mismatching layers options was invalid.
19142 @raise IOError: Raised if an error occurred with the import process.
19143 @see: L{exportImages()}, L{PaintableLayer.importImages()}
19144 """
19145 pass
19146
19147 - def layer(self, LayerName):
19148 """Returns the layer with the given name.
19149
19150 @type LayerName: str
19151 @param LayerName: The name of the layer to retrieve
19152 @rtype: L{Layer}
19153 @return: The requested layer.
19154 @raise ValueError: Raised if the given layer name was not found on the object.
19155 """
19156 pass
19157
19159 """Returns the list of layers that make up this objects layer stack.
19160
19161 @rtype: list of L{Layer}
19162 @return: The list of layers for this object's layer stack
19163 """
19164 pass
19165
19167 """Merges the given layers within the layer stack into a single paintable layer.
19168
19169 @type LayersToMerge: list of L{Layer}
19170 @param LayersToMerge: The list of layers to merge. If empty all currently selected layers will be used.
19171 @type RefLayer: L{Layer}
19172 @param RefLayer: The reference layer, above which the merge result is added. If None then the new layer is added to the top of this stack.
19173 @type Flags: int
19174 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
19175 @rtype: L{Layer}
19176 @return: The newly created merged layer
19177 @raise ValueError: Raised if the layers to merge or the reference layer are not in this stack.
19178 """
19179 pass
19180
19181 - def moveLayer(self, LayerToMove, RefLayer=None):
19182 """Moves the layer from its current layer stack position to this stack and position.
19183
19184 @type LayerToMove: L{Layer}
19185 @param LayerToMove: The layer that is to be moved.
19186 @type RefLayer: L{Layer}
19187 @param RefLayer: The reference layer to move the layer above. If None then the layer is moved to the top of this stack.
19188 @rtype: None
19189 @raise ValueError: Raised if the reference layer is not in this stack.
19190 """
19191 pass
19192
19194 """Moves the layer from its current layer stack position to this stack and position.
19195
19196 @type LayerToMove: L{Layer}
19197 @param LayerToMove: The layer that is to be moved.
19198 @type RefLayer: L{Layer}
19199 @param RefLayer: The reference layer to move the layer below. If None then the layer is moved to the top of this stack.
19200 @rtype: None
19201 @raise ValueError: Raised if the reference layer is not in this stack.
19202 """
19203 pass
19204
19206 """Returns the name of the object.
19207
19208 @rtype: str
19209 @return: The name of this object
19210 """
19211 pass
19212
19214 """Removes the given layers within the layer stack.
19215
19216 @type LayersToRemove: list of L{Layer}
19217 @param LayersToRemove: The list of layers to remove. If empty all currently selected layers will be used.
19218 @rtype: None
19219 @raise ValueError: Raised if the layers to remove are not in this stack.
19220 """
19221 pass
19222
19224 """Shares the layer from its current layer stack position to this stack and position.
19225
19226 @type LayerToShare: L{Layer}
19227 @param LayerToShare: The layer that is to be shared.
19228 @type RefLayer: L{Layer}
19229 @param RefLayer: The reference layer to move the layer above. If None then the layer is moved to the top of this stack.
19230 @type Flags: int
19231 @param Flags: Optional layer creation flags. Values of L{LayerCreateFlag} or'ed together.
19232 @rtype: L{Layer}
19233 @return: The newly-shared layer.
19234 @raise ValueError: Raised if the reference layer is not in this stack.
19235 """
19236 pass
19237
19239 """Removes the group layers specified and inserts the deleted group's layer stack in its place in the layer stack.
19240
19241 @type GroupLayersToUngroup: list of L{Layer}
19242 @param GroupLayersToUngroup: The list of group layers to ungroup. If empty all currently selected layers will be used.
19243 @rtype: None
19244 @raise ValueError: Raised if the layers to ungroup are not in this stack.
19245 """
19246 pass
19247
19248 @staticmethod
19250 """Returns a list of adjustment layer types that can be created.
19251
19252 @rtype: list of str
19253 @return: A list of adjustment layer types
19254 """
19255 pass
19256
19257 @staticmethod
19259 """Returns a list of procedural layer types that can be created.
19260
19261 @rtype: list of str
19262 @return: A list of procedural layer types
19263 """
19264 pass
19265
19268 """These are the geometric meshes referred to as "Objects" in the GUI.
19269
19270 B{Example Code}
19271
19272 C{# This examples obtains the current geometry object}
19273
19274 C{import mari}
19275
19276 C{current_object = mari.geo.current()}
19277
19278 @cvar DESTROY_NONE: Don't destroy the layers.
19279 @cvar DESTROY_ALL: Destroy the channel and its layers regardless.
19280 @cvar DESTROY_UNSHARED: Don't destroy the channel.
19281 @cvar SYSTEM_SHADER_CURRENT_CHANNEL: Current L{Channel}.
19282 @cvar SYSTEM_SHADER_CURRENT_LAYER_AND_BELOW: Current L{Layer} & Below.
19283 @cvar SYSTEM_SHADER_CURRENT_LAYER: Current L{Layer}.
19284 @cvar SYSTEM_SHADER_CURRENT_PAINT_TARGET: Current Paint Target.
19285 @group Signals: channelAdded, channelCreated, channelMadeCurrent, channelRemoved, geometryVersionAdded, geometryVersionMadeCurrent, geometryVersionRemoved, imageSetAdded, imageSetMadeCurrent, imageSetRemoved, nameChanged, shaderAdded, shaderCreated, shaderMadeCurrent, shaderRemoved
19286 """
19287
19289 """Strategy adopted when destroying a channel that's shared.
19290 @cvar DESTROY_NONE: Don't destroy the layers.
19291 @cvar DESTROY_ALL: Destroy the channel and its layers regardless.
19292 @cvar DESTROY_UNSHARED: Don't destroy the channel.
19293 @note: These values are exposed in the parent class, but are also documented here for convenience.
19294 """
19295 DESTROY_NONE = 0
19296 DESTROY_ALL = 1
19297 DESTROY_UNSHARED = 2
19298
19299 DESTROY_NONE = 0
19300 DESTROY_ALL = 1
19301 DESTROY_UNSHARED = 2
19302
19304 """Tye type of system shaders such as "Current Channel" and "Current Layer" shaders.
19305 @cvar SYSTEM_SHADER_CURRENT_CHANNEL: Current L{Channel}.
19306 @cvar SYSTEM_SHADER_CURRENT_LAYER_AND_BELOW: Current L{Layer} & Below.
19307 @cvar SYSTEM_SHADER_CURRENT_LAYER: Current L{Layer}.
19308 @cvar SYSTEM_SHADER_CURRENT_PAINT_TARGET: Current Paint Target.
19309 @note: These values are exposed in the parent class, but are also documented here for convenience.
19310 """
19311 SYSTEM_SHADER_CURRENT_CHANNEL = 0
19312 SYSTEM_SHADER_CURRENT_LAYER_AND_BELOW = 1
19313 SYSTEM_SHADER_CURRENT_LAYER = 2
19314 SYSTEM_SHADER_CURRENT_PAINT_TARGET = 3
19315
19316 SYSTEM_SHADER_CURRENT_CHANNEL = 0
19317 SYSTEM_SHADER_CURRENT_LAYER_AND_BELOW = 1
19318 SYSTEM_SHADER_CURRENT_LAYER = 2
19319 SYSTEM_SHADER_CURRENT_PAINT_TARGET = 3
19320
19322 """Add a locator to this object.
19323
19324 @rtype: L{LocatorEntity}
19325 @return: The newly-created locator.
19326 """
19327 pass
19328
19329 - def addVersion(self, Paths, Name, Options=None):
19330 """Adds a new version of the object from one or more files.
19331
19332 It is often useful to have multiple versions of a geometry available to test.
19333
19334 When adding versions, it is assumed that only the world space positions and normals of the objects have changed.
19335
19336 When dealing with geometry with updated UVs, no conversion occurs, and rendering artifacts may be seen.
19337
19338 As in L{GeoManager.load()}, the settings for the geometry load can be controlled by the function parameter L{Options}, and the format of the parameter is the same.
19339
19340 @type Paths: variant
19341 @param Paths: The path(s) to the file(s) containing the new version geometry. This must be either a single pathname, or a list of pathnames.
19342 @type Name: str
19343 @param Name: The name for the new version. This must be unique for this item.
19344 @type Options: variant
19345 @param Options: An optional dictionary (or list, for backwards compatibility) of settings to control the geometry load, as in L{GeoManager.load()}
19346 @rtype: None
19347 @raise ValueError: Raised if no paths were provided, any of the file paths were empty, the version name already exists, or the options string list was invalid.
19348 @raise IOError: Raised if any of the files to load the version from was not found.
19349 @raise TypeError: Raised if the paths parameter is not a string or list of strings.
19350 @raise RuntimeError: Raised if the mesh types are invalid for adding version.
19351 @note: The Options initially default to the settings from the current version of the Object. Any options provided are treated as overrides to the defaults.
19352 @deprecated: Please pass the Options parameter in C{{'name': value}} dictionary format, instead of the old C{['name=value']} list format.
19353 @see: L{versionList()}, L{removeVersion()}, L{renameVersion()}, L{versionNames()}
19354 """
19355 pass
19356
19358 """Returns the lower bounds of the object bounding box.
19359
19360 @rtype: L{VectorN}
19361 @return: Vector of the lower bounds.
19362 """
19363 pass
19364
19366 """Returns the upper bounds of the object bounding box.
19367
19368 @rtype: L{VectorN}
19369 @return: Vector of the upper bounds.
19370 """
19371 pass
19372
19374 """Return the centrum of the bounding sphere of the object.
19375
19376 @rtype: L{VectorN}
19377 @return: The position of the sphere center.
19378 """
19379 pass
19380
19382 """Return the radius of the bounding sphere of the object.
19383
19384 @rtype: float
19385 @return: The sphere radius.
19386 """
19387 pass
19388
19390 """Returns the channel with the given name.
19391
19392 @type ChannelName: str
19393 @param ChannelName: The name of the channel to retrieve
19394 @rtype: L{Channel}
19395 @return: The requested channel.
19396 @raise ValueError: Raised if the given channel name was not found on the object.
19397 """
19398 pass
19399
19401 """This is emitted when a new channel is added, by creation and loading.
19402
19403 This signal will be emitted multipl times during a channels creation. If you only want one signal use L{channelCreated()}
19404
19405 @type NewChannel: L{Channel}
19406 @param NewChannel: The newly-added channel
19407 @rtype: None
19408 """
19409 pass
19410
19412 """This is emitted when a new channel is created on the entity.
19413
19414 @type NewChannel: L{Channel}
19415 @param NewChannel: The newly-created channel
19416 @rtype: None
19417 """
19418 pass
19419
19421 """Returns a list of channels present on the object.
19422
19423 @rtype: list of L{Channel}
19424 @return: A list of the channels associated with this object
19425 """
19426 pass
19427
19429 """This is emitted when a different channel is made current.
19430
19431 @type NewCurrentChannel: L{Channel}
19432 @param NewCurrentChannel: The channel that is now current.
19433 @rtype: None
19434 """
19435 pass
19436
19438 """This is emitted when a channel is removed.
19439
19440 @type OldChannel: L{Channel}
19441 @param OldChannel: The removed channel
19442 @rtype: None
19443 """
19444 pass
19445
19447 """Returns a list of all the different UV patches that make up this object.
19448
19449 This function behaves the same as L{patchList()} except that invalid patches are appeneded to the end of the returned list.
19450
19451 @rtype: list of L{GeoPatch}
19452 @return: A list of the UV patch objects associated with this geometry
19453 @see: L{patchList()}
19454 """
19455 pass
19456
19457 - def createChannel(self, Name, Width, Height, Depth, IsShaderStack=False):
19458 """Creates a new channel from the settings provided.
19459
19460 This function can be used to create either UV or L{Ptex} channels, depending on whether or not the entity is using L{Ptex}. For L{Ptex} channels, the L{Width} and L{Height} parameters are ignored, so using the function L{createPtexChannel()} is more convenient.
19461
19462 @type Name: str
19463 @param Name: The name to call the new channel
19464 @type Width: int
19465 @param Width: The default width of the channel (ignored for L{Ptex})
19466 @type Height: int
19467 @param Height: The default height of the channel (ignored for L{Ptex})
19468 @type Depth: int
19469 @param Depth: The default bit depth of the channel
19470 @type IsShaderStack: bool
19471 @param IsShaderStack: If True create the channel as a ShaderStack. If none is passed a nonShaderStack is created.
19472 @rtype: L{Channel}
19473 @return: The newly-created channel
19474 @raise ValueError: Raised if the channel name is already in use, depth is not supported or width and height are not supported
19475 @raise RuntimeError: Raised if the channel could not be created
19476 @see: L{createDuplicateChannel()}, L{createPtexChannel()}
19477 """
19478 pass
19479
19481 """Creates a new shader from the combination of diffuse and specular.
19482
19483 @type Name: str
19484 @param Name: The name of the shader to create.
19485 @type DiffuseType: str
19486 @param DiffuseType: The diffuse type of the shader to create.
19487 @type SpecularType: str
19488 @param SpecularType: The specular type of the shader to create.
19489 @rtype: L{Shader}
19490 @return: The new shader.
19491 @raise RuntimeError: Raised if the shader could not be created.
19492 """
19493 pass
19494
19496 """Creates a new channel as a duplicate of the passed channel.
19497
19498 @type ChannelToDuplicate: L{Channel}
19499 @param ChannelToDuplicate: The channel to duplicate. It must be a channel that is part of this L{GeoEntity}.
19500 @type NewChannelName: str
19501 @param NewChannelName: The name to call the new channel. If none is passed, a name will be generated.
19502 @rtype: L{Channel}
19503 @return: The newly created channel.
19504 @raise RuntimeError: Raised if the channel could not be created, or if ChannelToDuplicate is not part of this L{GeoEntity}.
19505 @see: L{createChannel()}, L{createPtexChannel()}
19506 """
19507 pass
19508
19510 """Creates a new layered shader.
19511
19512 @type Name: str
19513 @param Name: The name of the shader to create.
19514 @type LayeredType: str
19515 @param LayeredType: The layered type of the shader to create.
19516 @rtype: L{Shader}
19517 @return: The new shader.
19518 @raise RuntimeError: Raised if the shader could not be created.
19519 """
19520 pass
19521
19523 """Creates a new L{Ptex} channel from the settings provided.
19524
19525 For entities using L{Ptex}, this is the same as calling L{createChannel()}, but does not require the width and height parameters, which are not applicable.
19526
19527 For entities not using L{Ptex}, this function will raise an exception.
19528
19529 @type Name: str
19530 @param Name: The name to call the new channel
19531 @type Depth: int
19532 @param Depth: The default bit depth of the channel
19533 @rtype: L{Channel}
19534 @return: The newly-created channel
19535 @raise ValueError: Raised if the channel name is already in use, depth is not supported or width and height are not supported
19536 @raise RuntimeError: Raised if the channel could not be created, or if the entity is not using L{Ptex}
19537 @see: L{createChannel()}, L{createDuplicateChannel()}
19538 """
19539 pass
19540
19542 """Creates a standalone shader or diffuse and specular shader.
19543
19544 Creates a standalone shader or diffuse and specular shader.
19545
19546 This method is provided for compatibility only and will be removed in a future version.
19547
19548 Please use L{createStandaloneShader()} or L{createDiffuseSpecularShader()} instead.
19549
19550 This creates a standalone shader or a shader consisting of diffuse and specular. For example,
19551
19552 To create a standalone shader of type Flat:
19553
19554 C{GeoEntity.createShader("Flat","Lighting/Standalone/Flat");}
19555
19556 To create a diffuse and specular shader of type Lambertian and Phong:
19557
19558 C{GeoEntity.createShader("Phong","Lighting/Diffuse/Lambertian","Lighting/Specular/Phong");}
19559
19560 @type Name: str
19561 @param Name: The name of the shader to create.
19562 @type Type: str
19563 @param Type: The standalone type of the shader to create if L{SpecularType} is empty. The diffuse type of the shader to create if L{SpecularType} is provided.
19564 @type SpecularType: str
19565 @param SpecularType: The specular type of the shader to create.
19566 @rtype: L{Shader}
19567 @return: The new shader.
19568 @raise RuntimeError: Raised if the shader could not be created.
19569 @deprecated: This method will be removed in a future version. Please use L{createStandaloneShader()} or L{createDiffuseSpecularShader()} instead.
19570 @see: L{createStandaloneShader()}
19571 """
19572 pass
19573
19575 """Creates a new standalone shader.
19576
19577 @type Name: str
19578 @param Name: The name of the shader to create.
19579 @type StandaloneType: str
19580 @param StandaloneType: The standalone type of the shader to create.
19581 @rtype: L{Shader}
19582 @return: The new shader.
19583 @raise RuntimeError: Raised if the shader could not be created.
19584 """
19585 pass
19586
19588 """Returns the channel currently selected on the entity.
19589
19590 @rtype: L{Channel}
19591 @return: The currently selected channel, or None if none.
19592 @see: L{setCurrentChannel()}
19593 """
19594 pass
19595
19597 """Returns the image set currently selected for painting into on the entity.
19598
19599 @rtype: L{ImageSet}
19600 @return: The currently-selected image set, or None if none.
19601 @see: L{setCurrentImageSet()}
19602 """
19603 pass
19604
19606 """Returns the currently active shader.
19607
19608 @rtype: L{Shader}
19609 @return: The active shader for this object
19610 @see: L{setCurrentShader()}
19611 """
19612 pass
19613
19615 """Returns the currently active version of the object.
19616
19617 @rtype: L{GeoEntityVersion}
19618 @return: The currently active version.
19619 @see: L{currentVersionName()}, L{setCurrentVersion()}
19620 """
19621 pass
19622
19624 """Returns the name of the currently active version of the object.
19625
19626 @rtype: str
19627 @return: The name of the currently active version
19628 @see: L{currentVersion()}
19629 """
19630 pass
19631
19633 """Export this L{GeoEntity} as a light weight geometry archive.
19634
19635 @type DirPath: str
19636 @param DirPath: The directory path to save the L{GeoEntity} archive to.
19637 @rtype: None
19638 """
19639 pass
19640
19642 """Returns the channel with the given name.
19643
19644 @type ChannelName: str
19645 @rtype: L{Channel}
19646 @return: The requested channel. Return None is not found.
19647 """
19648 pass
19649
19651 """Returns the image set with the given name if found, or None.
19652
19653 The string matching is case insensitive.
19654
19655 @type rName: str
19656 @rtype: L{ImageSet}
19657 @return: The given image set if found, or None otherwise
19658 """
19659 pass
19660
19662 """Finds and returns any shader with the given name.
19663
19664 @type Name: str
19665 @param Name: The name of the shader to look for.
19666 @rtype: L{Shader}
19667 @return: The matching shader if found, or None otherwise.
19668 @see: L{shader()}
19669 """
19670 pass
19671
19673 """Generates subdivision surfaces.
19674
19675 This calls OpenSubdiv library to generate subdivision surfaces. L{Options} can be specified to set the following:
19676 - Level (int) : Subdivision Level
19677 - Force (bool) : True to force subdivision of geometry pieces marked as "Don't subdivide"
19678 - Use Source (bool) : True, to automatically use subdivision settings (scheme and rules) from the source geometry file, or False, to use user-supplied settings.
19679 - Scheme (L{GeoManager.OpenSubdivisionSchemeType}) : Subdivision scheme
19680 - Boundary Interpolation (L{GeoManager.OpenSubdivisionBoundaryInterpolation}) : Boundary interpolation rule
19681 - Face Varying Interpolation (L{GeoManager.OpenSubdivisionFaceVaryingInterpolation}) : Face-varying data interpolation rule
19682 - Creasing (L{GeoManager.OpenSubdivisionCreasingMethod}) : Creasing method
19683 - Triangle Subdivision (L{GeoManager.OpenSubdivisionTriangleSubdivision}) : Triangle subdivision rule
19684
19685 The following options are DEPRECATED:
19686 - Scheme (string) : One of "Catmull Clark", "Loop" or "Bilinear"
19687 - Boundary Interpolation (string) : One of "None", "Edge Only", "Edge And Corner (No Corner Progation)" or "Edge And Corner (Corner Propagation)" or "Always Sharp"
19688
19689 Examples:
19690
19691 >>> import mari
19692 >>> # Subdivide using default settings from source file
19693 >>> options = {}
19694 >>> mari.geo.current().generateSubdivision(options)
19695 >>>
19696 >>> # Subdivide using overriden settings, Catmull clark subdivision at level 2
19697 >>> options = {}
19698 >>> options["Level"] = 2
19699 >>> options["Scheme"] = mari.geo.SCHEME_CATMARK
19700 >>> mari.geo.current().generateSubdivision(options)
19701 >>>
19702 >>> # Subdivide using overriden settings, Loop clark subdivision at level 3, boundary interpolation set to edge only, uv face varying interpolation set to boundaries
19703 >>> options = {}
19704 >>> options["Level"] = 3
19705 >>> options["Scheme"] = mari.geo.SCHEME_LOOP
19706 >>> options["Boundary Interpolation"] = mari.geo.VTX_BOUNDARY_EDGE_ONLY
19707 >>> options["Face Varying Interpolation"] = mari.geo.FVAR_LINEAR_BOUNDARIES
19708 >>> mari.geo.current().generateSubdivision(options)
19709 >>>
19710 >>> # Subdivide using overriden settings, Catmull clark subdivision at level 1, creasing set to chaikin and triangle subdivision set to smooth
19711 >>> options = {}
19712 >>> options["Level"] = 1
19713 >>> options["Scheme"] = mari.geo.SCHEME_CATMARK
19714 >>> options["Creasing"] = mari.geo.CREASE_CHAIKIN
19715 >>> options["Triangle Subdivision"] = mari.geo.TRI_SUB_SMOOTH
19716 >>> mari.geo.current().generateSubdivision(options)
19717
19718 @type Options: QMap of str, variant
19719 @param Options: L{Options} for generating subdivision surfaces up to.
19720 @rtype: bool
19721 @return: Returns whether subdivision succeeded.
19722 @raise ValueError: Raised if the operation fails, with warnings.
19723 @deprecated: Some of the key-values, passed in the Options map will be removed in future versions.
19724 """
19725 pass
19726
19728 """This is emitted when a new geometry version is added.
19729
19730 @type Name: str
19731 @param Name: The name of the new version
19732 @rtype: None
19733 """
19734 pass
19735
19737 """This is emitted when a new geometry version becomes current.
19738
19739 @type Name: str
19740 @param Name: The name of the newly current version
19741 @rtype: None
19742 """
19743 pass
19744
19746 """This is emitted when a geometry version is removed.
19747
19748 @type Name: str
19749 @param Name: The name of the version removed
19750 @rtype: None
19751 """
19752 pass
19753
19755 """Hide the locator UI object.
19756
19757 @rtype: None
19758 """
19759 pass
19760
19762 """Returns the image set with the given name.
19763
19764 The string matching is case insensitive.
19765
19766 @type rImageSetName: str
19767 @rtype: L{ImageSet}
19768 @return: The requested image set.
19769 @raise ValueError: Raised if the given image set name was not found on the object.
19770 """
19771 pass
19772
19774 """This is emitted when a image set is added to the object.
19775
19776 @type NewImageSet: L{ImageSet}
19777 @param NewImageSet: The newly-created image set
19778 @rtype: None
19779 """
19780 pass
19781
19783 """Returns a list of the image sets that are present on the entity.
19784
19785 @rtype: list of L{ImageSet}
19786 @return: A list of the image sets associated with this object
19787 """
19788 pass
19789
19791 """This is emitted when an image set becomes current.
19792
19793 @type CurrentImageSet: L{ImageSet}
19794 @param CurrentImageSet: The new current image set
19795 @rtype: None
19796 """
19797 pass
19798
19800 """Returns a string list of the names of all of the image sets that are present on the object.
19801
19802 @rtype: list of str
19803 @return: A list of the names of the image sets associated with this object
19804 """
19805 pass
19806
19808 """This is emitted when a image set is removed from the object.
19809
19810 @type OldImageSet: L{ImageSet}
19811 @param OldImageSet: The removed image set
19812 @rtype: None
19813 """
19814 pass
19815
19817 """Returns True if the object is L{Ptex} based.
19818
19819 @rtype: bool
19820 """
19821 pass
19822
19824 """Indicates whether the object is currently selected.
19825
19826 @rtype: bool
19827 @return: True if the object is selected, or False if not
19828 """
19829 pass
19830
19832 """Returns the maximum subdivision level calculated already for this L{GeoEntity}.
19833
19834 @rtype: int
19835 """
19836 pass
19837
19839 """Returns the name of the object.
19840
19841 @rtype: str
19842 @return: The name of this object
19843 @see: L{setName()}
19844 """
19845 pass
19846
19848 """This is emitted after the entity has been renamed.
19849
19850 @type NewName: str
19851 @param NewName: The new name of the entity
19852 @rtype: None
19853 """
19854 pass
19855
19857 """Returns the root shader node graph this L{GeoEntity} holds.
19858
19859 @rtype: L{NodeGraph}
19860 @return: The shader node graph
19861 """
19862 pass
19863
19864 - def patch(self, UvIndex):
19865 """Returns the patch that corresponds to the given UV index.
19866
19867 @type UvIndex: int
19868 @param UvIndex: The index of the patch to return
19869 @rtype: L{GeoPatch}
19870 @return: The requested patch
19871 @raise ValueError: If index is out of range
19872 """
19873 pass
19874
19876 """Convenience method to lookup the image for the specified patch.
19877
19878 on the specified channel.
19879
19880 @type Patch: L{GeoPatch}
19881 @param Patch: L{GeoPatch} object for which to do the lookup.
19882 @type pImageSet: L{ImageSet}
19883 @param pImageSet: L{ImageSet} object for which to do the lookup.
19884 @rtype: L{Image}
19885 @return: L{Image} object associated with the patch.
19886 @raise ValueError: Raised if Patch isn't a valid L{GeoPatch} object, or if Chan isn't a valid L{ImageSet} object.
19887 """
19888 pass
19889
19891 """Returns a list of the different valid UV patches that make up this object.
19892
19893 Geometry may be broken into multiple UV patches. Each UV patch occupies a single integer square in UV space. Each patch may have a name, associated metadata, and locked or hidden or valid status.
19894
19895 As of version 1.4v3, these patches are returned in UV index order - the same order as L{ImageSet.imageList()}. Note however that these indices do not necessarily map directly to UDIMs, as some UDIMs may be unused, and there will not be any corresponding spaces left empty in the array. To be sure of the UDIM of a patch, call the L{GeoPatch.udim()} method.
19896
19897 @rtype: list of L{GeoPatch}
19898 @return: A list of the UV patch objects associated with this geometry
19899 @note: In versions older than 1.4v3, this function does not necessarily return the images in any particular order, or in the same order as L{ImageSet.imageList()}.
19900 @note: Only valid patches are returned. To retreive all patches use L{completePatchList()}.
19901 @note: This method returns the combined list of all patches from the L{GeoEntityVersion} objects belonging to this L{GeoEntity}. See L{GeoEntityVersion.patchList()}
19902 @see: L{completePatchList()}
19903 """
19904 pass
19905
19907 """Removes the given channel.
19908
19909 This is added as an undo record, and so can be undone if required.
19910
19911 @type ChannelToRemove: L{Channel}
19912 @param ChannelToRemove: The channel to remove. This must be a channel owned by the L{GeoEntity}.
19913 @type Strategy: L{ChannelDestroyStrategy}
19914 @param Strategy: The logic used to remove shared items with the channel
19915 @rtype: None
19916 @raise ValueError: Raised if the channel provided is invalid, locked or does not belong to the object.
19917 """
19918 pass
19919
19921 """Removes the given shader.
19922
19923 This is added as an undo record, and so can be undone if required.
19924
19925 @type ShaderToRemove: L{Shader}
19926 @param ShaderToRemove: The shader to remove. This must be a shader owned by the L{GeoEntity}.
19927 @rtype: None
19928 @raise ValueError: Raised if the shader provided is invalid, locked or does not belong to the object.
19929 """
19930 pass
19931
19933 """Removes the named version of this object.
19934
19935 An object must have at least one version. Attempting to remove the last version of an object will fail.
19936
19937 @type VersionName: str
19938 @param VersionName: The name of the version to remove
19939 @rtype: None
19940 @raise ValueError: Raised if the given version name was not found.
19941 @raise RuntimeError: Raised if the given version could not be removed because it was the last one on the object.
19942 @see: L{addVersion()}, L{renameVersion()}
19943 """
19944 pass
19945
19947 """Renames a geometry version.
19948
19949 The new name must be unique for this object.
19950
19951 @type OldName: str
19952 @param OldName: The name of the version you wish to change
19953 @type NewName: str
19954 @param NewName: The new name for the version. This must be unique for the object.
19955 @rtype: None
19956 @return: True if the name was performed, False otherwise
19957 @raise ValueError: Raised if the provided old name did not match any available version to change, or the new name was a duplicate of an existing version name.
19958 @see: L{versionList()}, L{removeVersion()}, L{versionNames()}, L{addVersion()}
19959 """
19960 pass
19961
19962 - def save(self, FileName, Format=""):
19963 """Saves the geometry into a file.
19964
19965 The current version at the current subdivision level is saved.
19966
19967 @type FileName: str
19968 @param FileName: The file name to save as
19969 @type Format: str
19970 @param Format: The geometry format. If not provided, the format is guessed from the extension
19971 @rtype: None
19972 @raise RuntimeError: Raised if the geometry cannot be saved .
19973 """
19974 pass
19975
19977 """Returns a list of the different selected UV patches that make up this object.
19978
19979 @rtype: list of L{GeoPatch}
19980 @return: A list of the currently selected UV patch objects associated with this geometry
19981 """
19982 pass
19983
19985 """Makes the given channel current on this object.
19986
19987 @type NewCurrentChannel: L{Channel}
19988 @param NewCurrentChannel: The channel to make current
19989 @rtype: None
19990 @raise ValueError: Raised if the channel provided is invalid, locked or does not belong to the object.
19991 @see: L{currentChannel()}
19992 """
19993 pass
19994
19996 """Sets the image set to be 'current', or active for painting into.
19997
19998 @type NewCurrentImageSet: variant
19999 @param NewCurrentImageSet: The image set to make current. This must be either an L{ImageSet} object owned by the L{GeoEntity}, or the name of one.
20000 @rtype: None
20001 @raise ValueError: Raised if the image set is invalid, or not owned by the object.
20002 @raise TypeError: Raised if the image set parameter is not a string or L{ImageSet} object.
20003 @see: L{currentImageSet()}
20004 """
20005 pass
20006
20008 """Makes the given shader current on this object.
20009
20010 @type NewCurrentShader: L{Shader}
20011 @param NewCurrentShader: The shader to make current.
20012 @rtype: None
20013 @raise ValueError: Raised if the shader provided is invalid, locked or does not belong to the object.
20014 @see: L{currentShader()}
20015 """
20016 pass
20017
20019 """Sets the current active version of the object.
20020
20021 @type VersionName: str
20022 @param VersionName: The name of the version to set as current.
20023 @rtype: None
20024 @see: L{versionList()}, L{versionNames()}, L{currentVersion()}
20025 """
20026 pass
20027
20029 """Changes the name of the object.
20030
20031 @type NewName: str
20032 @param NewName: The new name of the object
20033 @rtype: None
20034 @see: L{name()}
20035 """
20036 pass
20037
20039 """Changes the selection state of the object.
20040
20041 @type Selected: bool
20042 @param Selected: True to select the object, or False to deselect it
20043 @rtype: None
20044 @note: Exactly one object can be selected at a time. If only one object is available, it cannot be deselected.
20045 """
20046 pass
20047
20049 """Sets the subdivision level to render this L{GeoEntity} at.
20050
20051 @type Level: int
20052 @param Level: Sudivision level to render this L{GeoEntity} at.
20053 @rtype: None
20054 @raise ValueError: Throws a value error if the given Level is below 0 or exceeds the maximum subdivision level calculated for the current version.
20055 """
20056 pass
20057
20070
20072 """Returns the shader with the given name.
20073
20074 @type Name: str
20075 @param Name: The name of the shader to look for.
20076 @rtype: L{Shader}
20077 @return: The matching shader.
20078 @raise ValueError: Raised if the given shader name was not found on the object.
20079 @see: L{findShader()}
20080 """
20081 pass
20082
20084 """This is emitted when a new shader is added.
20085
20086 @type NewShader: L{Shader}
20087 @param NewShader: The newly-added shader.
20088 @rtype: None
20089 @deprecated: This signal will be removed or repurposed in a future version. Please use L{shaderCreated()} instead.
20090 """
20091 pass
20092
20094 """This is emitted when a new shader is created.
20095
20096 @type NewShader: L{Shader}
20097 @param NewShader: The newly-created shader.
20098 @rtype: None
20099 """
20100 pass
20101
20103 """Returns a list of shaders present on the object.
20104
20105 @rtype: list of L{Shader}
20106 @return: A list of the shaders associated with this object
20107 """
20108 pass
20109
20111 """This is emitted when a different shader is made current.
20112
20113 @type CurrentShader: L{Shader}
20114 @param CurrentShader: The shader that became current.
20115 @rtype: None
20116 """
20117 pass
20118
20120 """This is emitted when a shader is removed.
20121
20122 @type OldShader: L{Shader}
20123 @param OldShader: The removed shader.
20124 @rtype: None
20125 """
20126 pass
20127
20129 """Show the locator UI object.
20130
20131 @rtype: None
20132 """
20133 pass
20134
20136 """Returns the collated subdivision boundary interpolation rule for this L{GeoEntity}.
20137
20138 @rtype: str
20139 """
20140 pass
20141
20143 """Returns the collated subdivision creasing for this L{GeoEntity}.
20144
20145 @rtype: str
20146 """
20147 pass
20148
20150 """Returns the collated subdivision face varying interpolation rule for this L{GeoEntity}.
20151
20152 @rtype: str
20153 """
20154 pass
20155
20157 """Returns the collated subdivision scheme for this L{GeoEntity}.
20158
20159 @rtype: str
20160 """
20161 pass
20162
20164 """Returns the list of skipped meshes during subdivision.
20165
20166 @rtype: list of str
20167 """
20168 pass
20169
20171 """Returns the collated subdivision triangle rule for this L{GeoEntity}.
20172
20173 @rtype: str
20174 """
20175 pass
20176
20178 """Returns the system shader of the specified type.
20179
20180 @type Type: L{SystemShaderType}
20181 @param Type: The type of the desired system shader
20182 @rtype: L{Shader}
20183 @return: The system shader of the specified type
20184 @raise RuntimeError: Raised if the system shader could not be found.
20185 @raise ValueError: Raised if invalid type is specified by Type.
20186 """
20187 pass
20188
20199
20201 """Returns the translation vector at a given frame.
20202
20203 @type Frame: int
20204 @param Frame: L{Frame}
20205 @rtype: L{VectorN}
20206 @return: Vector of the translation.
20207 """
20208 pass
20209
20211 """Returns a geometry version object.
20212
20213 @type VersionName: str
20214 @param VersionName: The name of the version to return. This should be one of the names returned by L{versionNames()}.
20215 @rtype: L{GeoEntityVersion}
20216 @return: The requested version object.
20217 @raise ValueError: Raised if the version name was not found.
20218 @see: L{versionNames()}
20219 """
20220 pass
20221
20223 """Returns a list of the available versions of this geometry.
20224
20225 @rtype: list of L{GeoEntityVersion}
20226 @return: A list of the available geometry versions
20227 @see: L{addVersion()}, L{removeVersion()}, L{versionNames()}
20228 """
20229 pass
20230
20232 """Returns a list of names of the available versions of this geometry.
20233
20234 @rtype: list of str
20235 @return: A list of the names of the geometry versions
20236 @see: L{versionList()}
20237 """
20238 pass
20239
20240 @staticmethod
20242 """Returns a list of diffuse shader types.
20243
20244 @rtype: list of str
20245 @return: A list of diffuse shader types.
20246 """
20247 pass
20248
20249 @staticmethod
20251 """Returns a list of layered shader types that can be created.
20252
20253 @rtype: list of str
20254 @return: A list of layered shader types.
20255 """
20256 pass
20257
20258 @staticmethod
20260 """Returns a list of specular shader types.
20261
20262 @rtype: list of str
20263 @return: A list of specular shader types.
20264 """
20265 pass
20266
20267 @staticmethod
20269 """Returns a list of standalone shader types that can be created.
20270
20271 @rtype: list of str
20272 @return: A list of standalone shader types.
20273 """
20274 pass
20275
20278 """Procedural layers use GPU processing operations to generate image data.
20279
20280 These layers will normally take up no disk space, but consume GPU processing time to calculate their image data whenever it is visible. As an alternative, they can be cached, which will consume disk space for the cached image data, but decrease GPU processing time.
20281
20282 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
20283
20284 You can check for L{ProceduralLayer} objects by calling L{Layer.isProceduralLayer()}:
20285
20286 B{Example Code}
20287
20288 >>> #This example finds procedural layers in the current channel
20289 >>> import mari
20290 >>> procedural_layers = []
20291 >>> channel = mari.geo.current().currentChannel()
20292 >>> for layer in channel.layerList():
20293 ... if layer.isProceduralLayer():
20294 ... procedural_layers.append(layer)
20295
20296 >>> #This example creates an "Brightness" procedural layers in the current channel
20297 >>> import mari
20298 >>> channel = mari.geo.current().currentChannel()
20299 >>> layer = channel.createProceduralLayer("Constant","Basic/Constant")
20300 >>> layer.isProceduralLayer()
20301 True
20302 """
20303
20305 """Converts the layer into a paintable layer.
20306
20307 As this operation changes the layer type, it is suggested that you reobtain a reference to this layer.
20308
20309 @type SelectedOnly: bool
20310 @param SelectedOnly: Whether or not to bake the result into all patches or only the selected patches.
20311 @rtype: None
20312 """
20313 pass
20314
20316 """Exports a set of images from the layer.
20317
20318 This is the same as selecting "Export Selected Layers" from the GUI with only the given layer selected. To export the entire layer stack, call L{LayerStack.exportImages()}.
20319
20320 Pass in the path and template to export the files to - for example:
20321
20322 >>> import mari
20323 >>> layer = mari.geo.current().currentChannel().currentLayer()
20324 >>> layer.exportImages('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
20325
20326 Only paintable and procedural layers can be exported individually in this way.
20327
20328 @type PathAndTemplate: str
20329 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
20330 @type Options: int
20331 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
20332 @type UVIndexList: list of int
20333 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
20334 @rtype: None
20335 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
20336 @raise IOError: Raised if an error occurred with the export process.
20337 @see: L{PaintableLayer.exportImages()}, L{LayerStack.exportImages()}, L{PaintableLayer.importImages()}
20338 """
20339 pass
20340
20342 """Exports images for the selected patches from this layer.
20343
20344 Pass in the path and template to export the files to - for example:
20345
20346 >>> layer.exportSelectedPatches('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
20347
20348 Only paintable and procedural layers can be exported individually in this way.
20349
20350 @type PathAndTemplate: str
20351 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
20352 @type Options: int
20353 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
20354 @rtype: None
20355 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
20356 @raise IOError: Raised if an error occurred with the export process.
20357 @see: L{ProceduralLayer.exportImages()}, L{LayerStack.exportImages()}, importImages()
20358 """
20359 pass
20360
20362 """Retrieves the current value of a parameter from this procedural layer.
20363
20364 @type ParameterName: str
20365 @param ParameterName: The name of the parameter to inspect.
20366 @rtype: variant
20367 @return: The current value of the parameter.
20368 @raise ValueError: Raised if name of the parameter does not match any existing items. Or there is an issue with the image value.
20369 @raise TypeError: Raised if the parameter does not relate to an image.
20370 @see: L{setProceduralParameter()}
20371 """
20372 pass
20373
20375 """Retrieves the current value of a parameter from this procedural layer and, if possible, return the L{Image} it relates to.
20376
20377 @type ParameterName: str
20378 @param ParameterName: The name of the parameter to inspect.
20379 @rtype: L{Image}
20380 @return: L{Image} of the parameter. None if not image is assigned.
20381 @raise ValueError: Raised if name of the parameter does not match any existing items.
20382 @see: L{getProceduralParameter()}
20383 """
20384 pass
20385
20387 """Get the name of the procedural type.
20388
20389 @rtype: str
20390 @return: The name of the type of procedural, which will be of the form C{'Cloud.procedural'}
20391 @deprecated: Please use the more reliable function L{proceduralType()} instead.
20392 """
20393 pass
20394
20396 """Returns the list of parameters on this procedural layer.
20397
20398 @rtype: list of str
20399 @return: A list of the parameter names for this procedural layer.
20400 """
20401 pass
20402
20404 """Get the name of the procedural type.
20405
20406 @rtype: str
20407 @return: The name of the type of procedural, which will be of the form C{'Procedural/Fractal/Cloud'}
20408 """
20409 pass
20410
20412 """Sets the value of a parameter on the procedural layer.
20413
20414 @type ParameterName: str
20415 @param ParameterName: The name of the parameter to modify.
20416 @type NewValue: variant
20417 @param NewValue: The new value for the parameter. This can be of a variety of types.
20418 @rtype: None
20419 @raise ValueError: Raised if the parameter could not be found, or was invalid.
20420 @see: L{getProceduralParameter()}
20421 """
20422 pass
20423
20426 """A post processing filter that applies a LUT from custom provided color values.
20427
20428 L{CustomLUTFilter} objects can be created by calling L{PostFilterCollection.createCustomLUT()}.
20429
20430 B{Example Code}
20431
20432 >>> # This examples creates a new CustomLUTFilter object through GLRender and PostFilterCollection
20433 >>> import mari
20434 >>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")
20435 >>> file_lut = filter_collection.createCustomLUT("New Custom LUT")
20436 >>> mari.gl_render.deletePostFilterCollection(filter_collection)
20437 """
20438
20440 """Sets the complete color data for the LUT.
20441
20442 @type Data: list of L{Color}
20443 @param Data: A list of all 1024 color entries that make up the LUT.
20444 @rtype: None
20445 """
20446 pass
20447
20450 """A specialised selection group that consists of faces."""
20451
20452 pass
20453
20456 """Channels are collections of layers that combine sets of image data to display using L{Shader} objects.
20457
20458 You can access channels through their parent L{GeoEntity} objects - for example: C{mari.geo.current().currentChannel()}
20459
20460 B{Example Code}
20461
20462 >>> # This example shows how to obtain the current channel of the current GeoEntity object
20463 >>> import mari
20464 >>> channel = mari.geo.current().currentChannel()
20465
20466 @cvar CONVERT_CHANNEL_ONLY: Convert only the layers in this channel only that are neither locked or shared.
20467 @cvar CONVERT_ALL: Convert all layers including locked and shared layers.
20468 @group Signals: colorspaceConfigChanged, layerMadeCurrent, lockedChanged, nameChanged, scalarColorspaceConfigChanged, snapshotAdded, snapshotRemoved
20469 """
20470
20472 """Specifies options for what layers are converted when converting the depth.
20473 @cvar CONVERT_CHANNEL_ONLY: Convert only the layers in this channel only that are neither locked or shared.
20474 @cvar CONVERT_ALL: Convert all layers including locked and shared layers.
20475 @note: These values are exposed in the parent class, but are also documented here for convenience.
20476 """
20477 CONVERT_CHANNEL_ONLY = 0
20478 CONVERT_ALL = 1
20479
20480 CONVERT_CHANNEL_ONLY = 0
20481 CONVERT_ALL = 1
20482
20483 - def bakeTo(self, TargetLayer, SelectedOnly=True):
20484 """Bakes the current channel into an existing layer.
20485
20486 @type TargetLayer: L{Layer}
20487 @param TargetLayer: The layer to bake the channel into.
20488 @type SelectedOnly: bool
20489 @param SelectedOnly: Whether or not to bake the result into all patches or only the selected patches.
20490 @rtype: bool
20491 @return: True if successful.
20492 @raise ValueError: The target layer provided was invalid, or not paintable.
20493 """
20494 pass
20495
20497 """Returns True if the textures in this channel will bleed when baked.
20498
20499 TODO: Texture bleeding or necessary for most of Mari operations . However, shared paintable layers and individual patches may not respect this file space depending on how it been adjusted elsewhere.
20500
20501 @rtype: bool
20502 @return: The texture bleed setting for this channel.
20503 @see: L{setBleed()}
20504 """
20505 pass
20506
20508 """Returns the node graph node that corresponds to this L{Channel}.
20509
20510 @rtype: L{BakePointNode}
20511 @return: the node graph node that corresponds to this L{Channel}
20512 """
20513 pass
20514
20516 """Returns the preferred colorspace of paintable layers in this channel.
20517
20518 New paintable layers created in this channel will use this colorspace. However, shared paintable layers and individual patches may not respect this colorspace depending on how it been adjusted elsewhere.
20519
20520 @rtype: L{Image.ColorSpace}
20521 @return: The preferred file space of paintable layers.
20522 @deprecated: This concept has been replaced by the OCIO colorspace system so is no longer used. It will be removed in a future version. Please use L{colorspaceConfig()} instead.
20523 @see: L{setColorSpace()}
20524 """
20525 pass
20526
20528 """Returns the colorspace configuration for color data of the channel.
20529
20530 New paintable layers created in this channel will use this colorspace configuration. However, shared paintable layers and individual patches may not respect this colorspace depending on how it's been adjusted elsewhere.
20531
20532 @rtype: L{ColorspaceConfig}
20533 @return: The colorspace configuration for color data.
20534 @see: L{setColorspaceConfig()}
20535 """
20536 pass
20537
20539 """This is emitted after the colorspace config for color data is modified for the channel.
20540
20541 @type Config: L{ColorspaceConfig}
20542 @rtype: None
20543 """
20544 pass
20545
20547 """Converts this channel's data to a new colorspace.
20548
20549 @type NewColorSpace: str
20550 @param NewColorSpace: The colorspace to convert this channel to
20551 @type Option: L{ConvertOption}
20552 @param Option: The option on which layers to convert
20553 @rtype: None
20554 """
20555 pass
20556
20558 """Creates a new snapshot of the object.
20559
20560 @type Name: str
20561 @param Name: A descriptive name for this snapshot. There is no restriction on naming convention, so it is recommended to make this clear, such as "new test version".
20562 @type ID: str
20563 @param ID: An optional identifier for this snapshot. This value can be used to group together sets of snapshots, as described in L{Snapshot.setID()}.
20564 @rtype: L{Snapshot}
20565 @return: The newly created snapshot.
20566 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20567 """
20568 pass
20569
20571 """Returns the currently active layer on the channel.
20572
20573 @rtype: L{Layer}
20574 @see: L{setCurrentLayer()}
20575 """
20576 pass
20577
20579 """Deletes the given snapshot.
20580
20581 @type ShotToDelete: L{Snapshot}
20582 @param ShotToDelete: The snapshot to delete
20583 @rtype: None
20584 @raise ValueError: The snapshot provided was invalid, or not owned by this object.
20585 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20586 @warning: This method cannot be undone, so please use caution.
20587 """
20588 pass
20589
20591 """Returns the preferred depth of paintable layers.
20592
20593 New paintable layers created in this channel will use this depth. Resizing the channel will also use this depth to calculate relative resizing sizes. However, shared paintable layers and individual patches may not respect this depth depending on how it has been adjusted elsewhere.
20594
20595 @rtype: L{Image.Depth}
20596 @return: The preferred height of paintable layers.
20597 @see: L{setDepth()}
20598 """
20599 pass
20600
20602 """Returns the preferred file space of paintable layers in this channel.
20603
20604 New paintable layers created in this channel will use this file space. However, shared paintable layers and individual patches may not respect this file space depending on how it been adjusted elsewhere.
20605
20606 @rtype: L{Image.FileSpace}
20607 @return: The preferred file space of paintable layers.
20608 @see: L{setFileSpace()}
20609 """
20610 pass
20611
20613 """Returns the snapshot with the given identifier, if found.
20614
20615 If more than one snapshot with the given identifier exists, the first one will be returned.
20616
20617 @type ID: str
20618 @param ID: The shot identifier to search for
20619 @rtype: L{Snapshot}
20620 @return: The first snapshot with the given identifier, or None
20621 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20622 """
20623 pass
20624
20626 """Merges all the layers in the channel into a single paintable layer and returns the layer.
20627
20628 @rtype: L{Layer}
20629 @return: The resulting paintable layer into which all the layers are flattened into.
20630 """
20631 pass
20632
20634 """Returns the L{GeoEntity} that this channel belongs to.
20635
20636 @rtype: L{GeoEntity}
20637 @return: The L{GeoEntity} that this channel belongs to.
20638 """
20639 pass
20640
20641 - def height(self, UVIndex=-1):
20642 """Returns either the maximum height of all patches in this channel, or a single patch.
20643
20644 New paintable layers created in this channel will use this height. Resizing the channel will also use this height to calculate relative resizing sizes. However, shared paintable layers and individual patches may not respect this height depending on how they have been resized elsewhere.
20645
20646 @type UVIndex: int
20647 @param UVIndex: The UV index of the patch to return the height of, or -1 to return the maximum height of all patches.
20648 @rtype: int
20649 @return: The maximum height of all patches, or the height of a single patch.
20650 @raise ValueError: Raised if an invalid UV index was specified.
20651 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20652 """
20653 pass
20654
20656 """Indicates whether this channel is locked, and if so, unmodifiable.
20657
20658 @rtype: bool
20659 @return: True if this image is locked, or False if unlocked
20660 @see: L{lock()}, L{unlock()}, L{setLocked()}
20661 """
20662 pass
20663
20665 """Returns True if this channel is L{Ptex} based.
20666
20667 @rtype: bool
20668 """
20669 pass
20670
20672 """Returns True if this is a ShaderStack.
20673
20674 @rtype: bool
20675 """
20676 pass
20677
20679 """This is emitted when a layer from the channel is made current.
20680
20681 @type pLayer: L{Layer}
20682 @param pLayer: The current layer
20683 @rtype: None
20684 """
20685 pass
20686
20688 """Locks the channel to prevent modifications.
20689
20690 @rtype: None
20691 @see: L{isLocked()}, L{setLocked()}, L{unlock()}
20692 """
20693 pass
20694
20696 """This is emitted after the channel is locked or unlocked.
20697
20698 @type Locked: bool
20699 @param Locked: True if the channel is now locked, or False otherwise
20700 @rtype: None
20701 """
20702 pass
20703
20705 """Sets this channel as the currently active channel on its L{GeoEntity}.
20706
20707 @rtype: None
20708 """
20709 pass
20710
20712 """Returns the name of the channel.
20713
20714 @rtype: str
20715 @return: The name of this channel.
20716 @see: L{setName()}
20717 """
20718 pass
20719
20721 """This is emitted after the channel has had its name changed.
20722
20723 @type NewName: str
20724 @param NewName: The new name.
20725 @rtype: None
20726 """
20727 pass
20728
20729 - def resize(self, NewSize, UVIndexList=[]):
20730 """Resize a set of patches in the channel.
20731
20732 @type NewSize: L{ImageSet.Size}
20733 @param NewSize: The desired size for the patch.
20734 @type UVIndexList: list of int
20735 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify which patches to resize the images of. If not specified or empty, all patches will be resized. The UDIM for a patch is the zero-based UV index plus 1001.
20736 @rtype: None
20737 @raise ValueError: Raised if the size provided was invalid, or if an invalid UV index was specified.
20738 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20739 """
20740 pass
20741
20743 """Reverts the state of the object to that in the given snapshot.
20744
20745 @type OldSnapshot: L{Snapshot}
20746 @param OldSnapshot: A valid snapshot of this object
20747 @rtype: None
20748 @raise ValueError: The snapshot provided was invalid, or not owned by this object.
20749 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20750 """
20751 pass
20752
20754 """Returns the colorspace configuration for scalar data of the channel.
20755
20756 New masks created in this channel will use this colorspace configuration. However, shared masks and individual patches may not respect this colorspace depending on how it's been adjusted elsewhere.
20757
20758 @rtype: L{ColorspaceConfig}
20759 @return: The colorspace configuration for scalar data.
20760 @see: L{setScalarColorspaceConfig()}
20761 """
20762 pass
20763
20765 """This is emitted after the colorspace config for scalar data is modified for the channel.
20766
20767 @type Config: L{ColorspaceConfig}
20768 @rtype: None
20769 """
20770 pass
20771
20773 """Sets the Texture L{Bleed} setting for this channel.
20774
20775 TODO: The file space set here will be propagated down to all non-shared paintable layers and their patches contained in this channel. The file space for Images (patches) may be altered by calling the appropriate functions on these objects.
20776
20777 @type Bleed: bool
20778 @param Bleed: The texture bleed setting for this channel.
20779 @rtype: None
20780 @see: L{bleed()}
20781 """
20782 pass
20783
20785 """Sets the colorspace of non-shared paintable layers in this channel.
20786
20787 The colorspace set here will be propagated down to all non-shared paintable layers and their patches contained in this channel. The colorspace for Images (patches) may be altered by calling the appropriate functions on these objects.
20788
20789 @type ColorSpace: L{Image.ColorSpace}
20790 @param ColorSpace: The colorspace to set non-shared layers to.
20791 @rtype: None
20792 @deprecated: This concept has been replaced by the OCIO colorspace system so is no longer used. It will be removed in a future version. Please use L{setColorspaceConfig()} instead.
20793 @see: L{colorSpace()}
20794 """
20795 pass
20796
20798 """Sets the colorspace configuration for color data of the channel.
20799
20800 The colorspace configuration set here will be propagated down to all non-shared paintable layers and their patches contained in the channel. The colorspace configuration for Images (patches) may be altered by calling the appropriate functions on these objects.
20801
20802 @type Config: L{ColorspaceConfig}
20803 @param Config: The colorspace configuration for color data.
20804 @rtype: None
20805 @raise ValueError: Raised if the colorspace configuration is invalid.
20806 @see: L{colorspaceConfig()}
20807 """
20808 pass
20809
20811 """Sets the given layer as the currently active layer on the channel and selects it.
20812
20813 @type NewCurrentLayer: L{Layer}
20814 @param NewCurrentLayer: The layer that is to be made current.
20815 @rtype: None
20816 @raise ValueError: Raised if the layer is not in this channel.
20817 @see: L{currentLayer()}
20818 """
20819 pass
20820
20822 """Sets the depth of this channel and converts internal layers' bit depths.
20823
20824 @type Depth: L{Image.Depth}
20825 @param Depth: The bit depth to convert this channel to
20826 @type Option: L{ConvertOption}
20827 @param Option: The option on which layers to convert bit depth of
20828 @rtype: None
20829 @see: L{depth()}
20830 """
20831 pass
20832
20834 """Sets the file space of non-shared paintable layers in this channel.
20835
20836 The file space set here will be propagated down to all non-shared paintable layers and their patches contained in this channel. The file space for Images (patches) may be altered by calling the appropriate functions on these objects.
20837
20838 @type FileSpace: L{Image.FileSpace}
20839 @param FileSpace: The file space to set non-shared layers to.
20840 @rtype: None
20841 @see: L{fileSpace()}
20842 """
20843 pass
20844
20846 """Locks or unlocks the channel, to optionally prevent modifications.
20847
20848 @type Locked: bool
20849 @rtype: None
20850 @see: L{isLocked()}, L{lock()}, L{unlock()}
20851 """
20852 pass
20853
20855 """Sets the name of the channel.
20856
20857 @type NewName: str
20858 @param NewName: The new name for the channel.
20859 @rtype: None
20860 @see: L{name()}
20861 """
20862 pass
20863
20865 """Sets the colorspace configuration for scalar data of the channel.
20866
20867 The colorspace configuration set here will be propagated down to all non-shared masks and their patches contained in the channel. The colorspace configuration for Images (patches) may be altered by calling the appropriate functions on these objects.
20868
20869 @type Config: L{ColorspaceConfig}
20870 @param Config: The colorspace configuration for scalar data.
20871 @rtype: None
20872 @raise ValueError: Raised if the colorspace configuration is invalid.
20873 @see: L{scalarColorspaceConfig()}
20874 """
20875 pass
20876
20878 """This is emitted after a snapshot is created for this object.
20879
20880 @type NewSnapshot: L{Snapshot}
20881 @rtype: None
20882 """
20883 pass
20884
20886 """Returns a list of the snapshots available on the object.
20887
20888 @rtype: list of L{Snapshot}
20889 @return: A list of the available snapshots
20890 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20891 """
20892 pass
20893
20895 """This is emitted after a snapshot is deleted for this object.
20896
20897 @type OldSnapshot: L{Snapshot}
20898 @rtype: None
20899 """
20900 pass
20901
20903 """Unlocks the channel and allows modifications.
20904
20905 @rtype: None
20906 @see: L{isLocked()}, L{lock()}, L{setLocked()}
20907 """
20908 pass
20909
20910 - def width(self, UVIndex=-1):
20911 """Returns either the maximum width of all patches in this channel, or a single patch.
20912
20913 New paintable layers created in this channel will use this width. Resizing the channel will also use this width to calculate relative resizing sizes. However, shared paintable layers and individual patches may not respect this width depending on how they have been resized elsewhere.
20914
20915 @type UVIndex: int
20916 @param UVIndex: The UV index of the patch to return the width of, or -1 to return the maximum width of all patches.
20917 @rtype: int
20918 @return: The maximum width of all patches, or the width of a single patch.
20919 @raise ValueError: Raised if an invalid UV index was specified.
20920 @raise NotImplementedError: Raised if the function is called on a L{Ptex} channel.
20921 """
20922 pass
20923
20924
20925 -class Particle(object):
20926 """Provides L{Particle} scripting.
20927
20928 @cvar EXPORT_CENTER_POSITIONS: Subtracts the object's center position from each of the particle positions.
20929 @cvar EXPORT_GEOMETRY_ID: Include attribute to identify which object the particle belongs to (name = geometryId, type = indexed string).
20930 @cvar EXPORT_PATCH_ID: Include attribute to identify which patch the particle belongs to (name = patchId, type = int).
20931 @cvar EXPORT_PARTICLE_ID: Include attribute to uniquely identify the particle (name = id, type = int).
20932 @cvar EXPORT_PIXEL_COORDINATE: Include attribute to identify the pixel within the patch that the particle belongs to (name = pixelCoordinate, type = int[2]).
20933 @cvar EXPORT_UV: Include attribute for the object's texture coordinates at the particle position (name = uv, type = float[2]).
20934 @cvar EXPORT_NORMAL: Include attribute for the object's world-space normal at the particle position (name = normal, type = vector).
20935 @cvar EXPORT_TANGENT: Include attribute for the object's world-space tangent at the particle position (name = tangent, type = vector).
20936 @cvar EXPORT_BITANGENT: Include attribute for the object's world-space bitangent at the particle position (name = bitangent, type = vector).
20937 @cvar EXPORT_ALPHA: Include alpha channel of all image set attributes.
20938 @cvar EXPORT_AMBIENT_OCCLUSION: Include ambient occlusion attribute at the particle position (name = ambientOcclusion, type = float).
20939 @cvar EXPORT_IGNORE_MEMORY_REQUIREMENT: The operation will still continue even if the system doesn't have enough memory available.
20940 @cvar EXPORT_RADIUS: Include attribute for the radius that encompasses the particle's immediate neighbours (name = radius, type = float).
20941 @cvar EXPORT_IGNORE_HIDDEN: The operation ignores hidden parts of the geometry.
20942 @cvar EXPORT_IGNORE_UNSELECTED: The operation ignores unselected parts of the geometry.
20943 @cvar EXPORT_MATCH_IMPORT: This is a special option only used in the transfer functions that makes the export options match the given import options.
20944 @cvar IMPORT_CENTER_POSITIONS: Subtracts the object's center position from each of the particle positions.
20945 @cvar IMPORT_BLEED_EDGES: Turns on "full texture bleed" (full patch texture bleed is generated).
20946 @cvar IMPORT_FLATTEN: The source layers/channel is flattened into a single image set prior to transfer (L{Layer} & channel transfer ONLY).
20947 @cvar IMPORT_IGNORE_HIDDEN: The operation ignores hidden parts of the geometry.
20948 @cvar IMPORT_IGNORE_UNSELECTED: The operation ignores unselected parts of the geometry.
20949 @cvar INTERPOLATION_NEAREST_NEIGHBOR: The value of the closest particle.
20950 @cvar INTERPOLATION_INVERSE_DISTANCE_WEIGHTED: The final value is the weighted average of the closest particles.
20951 @cvar INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SMOOTHER: The final value is the weighted average, with a smoother falloff, of the closest particles. This produces a more blurry result.
20952 @cvar INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SHARPER: The final value is the weighted average, with a sharper falloff, of the closest particles. This produces a more sharp result.
20953 @cvar RANGE_INFINITE: Ignore search range restrictions.
20954 @cvar RANGE_WORLD_SPACE_UNITS: Units are in world-space coordinates.
20955 @cvar RANGE_GEO_SIZE_PERCENTAGE: Units are a percentage of the world-space size of the geo being imported into.
20956 @cvar SEARCH_RADIAL: Search equally in all directions.
20957 @cvar SEARCH_BIDIRECTIONAL: Search in the direction and opposite direction of the surface normal.
20958 @cvar SEARCH_FORWARD: Search in the direction of the surface normal.
20959 @cvar SEARCH_BACKWARD: Search in the opposite direction of the surface normal.
20960 """
20961
20962 - class ExportFlags:
20963 """Specifies options for use in exporting.
20964 @cvar EXPORT_CENTER_POSITIONS: Subtracts the object's center position from each of the particle positions.
20965 @cvar EXPORT_GEOMETRY_ID: Include attribute to identify which object the particle belongs to (name = geometryId, type = indexed string).
20966 @cvar EXPORT_PATCH_ID: Include attribute to identify which patch the particle belongs to (name = patchId, type = int).
20967 @cvar EXPORT_PARTICLE_ID: Include attribute to uniquely identify the particle (name = id, type = int).
20968 @cvar EXPORT_PIXEL_COORDINATE: Include attribute to identify the pixel within the patch that the particle belongs to (name = pixelCoordinate, type = int[2]).
20969 @cvar EXPORT_UV: Include attribute for the object's texture coordinates at the particle position (name = uv, type = float[2]).
20970 @cvar EXPORT_NORMAL: Include attribute for the object's world-space normal at the particle position (name = normal, type = vector).
20971 @cvar EXPORT_TANGENT: Include attribute for the object's world-space tangent at the particle position (name = tangent, type = vector).
20972 @cvar EXPORT_BITANGENT: Include attribute for the object's world-space bitangent at the particle position (name = bitangent, type = vector).
20973 @cvar EXPORT_ALPHA: Include alpha channel of all image set attributes.
20974 @cvar EXPORT_AMBIENT_OCCLUSION: Include ambient occlusion attribute at the particle position (name = ambientOcclusion, type = float).
20975 @cvar EXPORT_IGNORE_MEMORY_REQUIREMENT: The operation will still continue even if the system doesn't have enough memory available.
20976 @cvar EXPORT_RADIUS: Include attribute for the radius that encompasses the particle's immediate neighbours (name = radius, type = float).
20977 @cvar EXPORT_IGNORE_HIDDEN: The operation ignores hidden parts of the geometry.
20978 @cvar EXPORT_IGNORE_UNSELECTED: The operation ignores unselected parts of the geometry.
20979 @cvar EXPORT_MATCH_IMPORT: This is a special option only used in the transfer functions that makes the export options match the given import options.
20980 @note: These values are exposed in the parent class, but are also documented here for convenience.
20981 """
20982 EXPORT_CENTER_POSITIONS = 1 << 0
20983 EXPORT_GEOMETRY_ID = 1 << 1
20984 EXPORT_PATCH_ID = 1 << 2
20985 EXPORT_PARTICLE_ID = 1 << 3
20986 EXPORT_PIXEL_COORDINATE = 1 << 4
20987 EXPORT_UV = 1 << 5
20988 EXPORT_NORMAL = 1 << 6
20989 EXPORT_TANGENT = 1 << 7
20990 EXPORT_BITANGENT = 1 << 8
20991 EXPORT_ALPHA = 1 << 9
20992 EXPORT_AMBIENT_OCCLUSION = 1 << 10
20993 EXPORT_IGNORE_MEMORY_REQUIREMENT = 1 << 11
20994 EXPORT_RADIUS = 1 << 12
20995 EXPORT_IGNORE_HIDDEN = 1 << 13
20996 EXPORT_IGNORE_UNSELECTED = 1 << 14
20997 EXPORT_MATCH_IMPORT = 1 << 15
20998
20999 EXPORT_CENTER_POSITIONS = 1 << 0
21000 EXPORT_GEOMETRY_ID = 1 << 1
21001 EXPORT_PATCH_ID = 1 << 2
21002 EXPORT_PARTICLE_ID = 1 << 3
21003 EXPORT_PIXEL_COORDINATE = 1 << 4
21004 EXPORT_UV = 1 << 5
21005 EXPORT_NORMAL = 1 << 6
21006 EXPORT_TANGENT = 1 << 7
21007 EXPORT_BITANGENT = 1 << 8
21008 EXPORT_ALPHA = 1 << 9
21009 EXPORT_AMBIENT_OCCLUSION = 1 << 10
21010 EXPORT_IGNORE_MEMORY_REQUIREMENT = 1 << 11
21011 EXPORT_RADIUS = 1 << 12
21012 EXPORT_IGNORE_HIDDEN = 1 << 13
21013 EXPORT_IGNORE_UNSELECTED = 1 << 14
21014 EXPORT_MATCH_IMPORT = 1 << 15
21015
21016 - class ImportFlags:
21017 """Specifies options for use in importing.
21018 @cvar IMPORT_CENTER_POSITIONS: Subtracts the object's center position from each of the particle positions.
21019 @cvar IMPORT_BLEED_EDGES: Turns on "full texture bleed" (full patch texture bleed is generated).
21020 @cvar IMPORT_FLATTEN: The source layers/channel is flattened into a single image set prior to transfer (L{Layer} & channel transfer ONLY).
21021 @cvar IMPORT_IGNORE_HIDDEN: The operation ignores hidden parts of the geometry.
21022 @cvar IMPORT_IGNORE_UNSELECTED: The operation ignores unselected parts of the geometry.
21023 @note: These values are exposed in the parent class, but are also documented here for convenience.
21024 """
21025 IMPORT_CENTER_POSITIONS = 1 << 0
21026 IMPORT_BLEED_EDGES = 1 << 1
21027 IMPORT_FLATTEN = 1 << 2
21028 IMPORT_IGNORE_HIDDEN = 1 << 3
21029 IMPORT_IGNORE_UNSELECTED = 1 << 4
21030
21031 IMPORT_CENTER_POSITIONS = 1 << 0
21032 IMPORT_BLEED_EDGES = 1 << 1
21033 IMPORT_FLATTEN = 1 << 2
21034 IMPORT_IGNORE_HIDDEN = 1 << 3
21035 IMPORT_IGNORE_UNSELECTED = 1 << 4
21036
21038 """The method of interpolation to use when calculating the final value from the closest particles on import.
21039 @cvar INTERPOLATION_NEAREST_NEIGHBOR: The value of the closest particle.
21040 @cvar INTERPOLATION_INVERSE_DISTANCE_WEIGHTED: The final value is the weighted average of the closest particles.
21041 @cvar INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SMOOTHER: The final value is the weighted average, with a smoother falloff, of the closest particles. This produces a more blurry result.
21042 @cvar INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SHARPER: The final value is the weighted average, with a sharper falloff, of the closest particles. This produces a more sharp result.
21043 @note: These values are exposed in the parent class, but are also documented here for convenience.
21044 """
21045 INTERPOLATION_NEAREST_NEIGHBOR = 0
21046 INTERPOLATION_INVERSE_DISTANCE_WEIGHTED = 1
21047 INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SMOOTHER = 2
21048 INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SHARPER = 3
21049
21050 INTERPOLATION_NEAREST_NEIGHBOR = 0
21051 INTERPOLATION_INVERSE_DISTANCE_WEIGHTED = 1
21052 INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SMOOTHER = 2
21053 INTERPOLATION_INVERSE_DISTANCE_WEIGHTED_SHARPER = 3
21054
21055 - class RangeUnits:
21056 """The units of measure for a given search range.
21057 @cvar RANGE_INFINITE: Ignore search range restrictions.
21058 @cvar RANGE_WORLD_SPACE_UNITS: Units are in world-space coordinates.
21059 @cvar RANGE_GEO_SIZE_PERCENTAGE: Units are a percentage of the world-space size of the geo being imported into.
21060 @note: These values are exposed in the parent class, but are also documented here for convenience.
21061 """
21062 RANGE_INFINITE = 0
21063 RANGE_WORLD_SPACE_UNITS = 1
21064 RANGE_GEO_SIZE_PERCENTAGE = 2
21065
21066 RANGE_INFINITE = 0
21067 RANGE_WORLD_SPACE_UNITS = 1
21068 RANGE_GEO_SIZE_PERCENTAGE = 2
21069
21070 - class SearchMethod:
21071 """The method used to search the particle cloud with from each of destination points.
21072 @cvar SEARCH_RADIAL: Search equally in all directions.
21073 @cvar SEARCH_BIDIRECTIONAL: Search in the direction and opposite direction of the surface normal.
21074 @cvar SEARCH_FORWARD: Search in the direction of the surface normal.
21075 @cvar SEARCH_BACKWARD: Search in the opposite direction of the surface normal.
21076 @note: These values are exposed in the parent class, but are also documented here for convenience.
21077 """
21078 SEARCH_RADIAL = 0
21079 SEARCH_BIDIRECTIONAL = 1
21080 SEARCH_FORWARD = 2
21081 SEARCH_BACKWARD = 3
21082
21083 SEARCH_RADIAL = 0
21084 SEARCH_BIDIRECTIONAL = 1
21085 SEARCH_FORWARD = 2
21086 SEARCH_BACKWARD = 3
21087
21088 - def availableOps(self):
21089 """Returns a list all the available operations chains.
21090
21091 @rtype: list of str
21092 """
21093 pass
21094
21095 - def exportGeo(self, FileName, Object, UVImageSizes, Flags, Frame, GeoVersion=None):
21096 """Exports a predefined set of attributes to a particle file on disk.
21097
21098 >>> geo_entity = mari.geo.current()
21099 >>> mari.particle.exportGeo('/tmp/filename.bgeo', geo_entity, {0: 256, 10: 512 },
21100 ... mari.particle.EXPORT_NORMAL, 0)
21101
21102 @type FileName: str
21103 @param FileName: The name of the file to export to. Any existing file will be overwritten.
21104 @type Object: L{GeoEntity}
21105 @param Object: The object to export attributes for.
21106 @type UVImageSizes: variant
21107 @param UVImageSizes: A dictionary that maps integer patch indices to sizes to export at. Only patch indices specified in the dictionary will be exported.
21108 @type Flags: int
21109 @param Flags: The options to export with. See L{ExportFlags}.
21110 @type Frame: int
21111 @param Frame: The animated frame number to export for.
21112 @type GeoVersion: L{GeoEntityVersion}
21113 @param GeoVersion: The geometry version to export for. If None then the current geometry version is used.
21114 @rtype: bool
21115 @return: True if the export completed successfully, or False otherwise.
21116 @raise TypeError: Raised if the patch sizes dictionary was in the wrong format.
21117 @raise ValueError: Raised if no object was given, no patch sizes are given, the patch indices are invalid, the patch sizes are invalid.
21118 """
21119 pass
21120
21121 - def exportImageSets(self, FileName, ImageSets, Flags, Frame, UVIndices, GeoVersion=None):
21122 """Exports a set of image sets to a particle file on disk.
21123
21124 The image sets must belong to the same object and have the same width and height. >>> geo_entity = mari.geo.current()
21125 >>> image_set = geo_entity.currentImageSet()
21126 >>> mari.particle.exportImageSets('/tmp/filename.bgeo', {'color' : image_set}, mari.particle.EXPORT_ALPHA,
21127 ... 0, [0, 1])
21128
21129 @type FileName: str
21130 @param FileName: The name of the file to export to. Any existing file will be overwritten.
21131 @type ImageSets: variant
21132 @param ImageSets: A dictionary that maps string particle attribute names, to export to, to image sets, to export from.
21133 @type Flags: int
21134 @param Flags: The options to export with. See L{ExportFlags}.
21135 @type Frame: int
21136 @param Frame: The animated frame number to export for.
21137 @type UVIndices: list of int
21138 @param UVIndices: Which patches to export for. Passing in an empty list will cause all patches to be exported.
21139 @type GeoVersion: L{GeoEntityVersion}
21140 @param GeoVersion: The geometry version to export for. If None then the current geometry version is used.
21141 @rtype: bool
21142 @return: True if the export completed successfully, or False otherwise.
21143 @raise ValueError: Raised if no image sets are given, the image sets are invalid, the patch indices are invalid, the patch sizes don't match or they don't belong to the same object.
21144 """
21145 pass
21146
21147 - def findOp(self, Name):
21148 """Returns the operations chain of the given name.
21149
21150 @type Name: str
21151 @param Name: The name of the operations chain to find.
21152 @rtype: L{ParticleOp}
21153 @return: The operations chain, or None if no operations chain exists for the given name.
21154 """
21155 pass
21156
21157 - def importImageSets(self, FileName, ImageSets, Interpolation, Flags, Frame, UVIndices, GeoVersion=None, SearchRange=1.0, SearchUnits=RANGE_INFINITE, Search=SEARCH_RADIAL, SampleCount=16):
21158 """Imports into a set of image sets from a particle file on disk.
21159
21160 The image sets must belong to the same object and have the same width and height. >>> geo_entity = mari.geo.current()
21161 >>> image_set = geo_entity.currentImageSet()
21162 >>> mari.particle.importImageSets('/tmp/filename.bgeo', {'color' : image_set},
21163 ... mari.particle.INTERPOLATION_INVERSE_DISTANCE_WEIGHTED,
21164 ... mari.particle.IMPORT_BLEED_EDGES, 0, [0, 1])
21165
21166 @type FileName: str
21167 @param FileName: The name of the file to import to.
21168 @type ImageSets: variant
21169 @param ImageSets: A dictionary that maps string particle attribute names, to import from, to image sets, to import into.
21170 @type Interpolation: L{InterpolationMethod}
21171 @param Interpolation: Which method of interpolation to use when calculating the final color value from the closest particles.
21172 @type Flags: int
21173 @param Flags: The options to import with. See L{ImportFlags}.
21174 @type Frame: int
21175 @param Frame: The animated frame number to import to.
21176 @type UVIndices: list of int
21177 @param UVIndices: Which patches to import into. Passing in an empty list will cause all patches to be imported.
21178 @type GeoVersion: L{GeoEntityVersion}
21179 @param GeoVersion: The geometry version to import to. If None then the current geometry version is used.
21180 @type SearchRange: float
21181 @param SearchRange: The maximum distance allowed to be searched.
21182 @type SearchUnits: L{RangeUnits}
21183 @param SearchUnits: The units of measure for the search range.
21184 @type Search: L{SearchMethod}
21185 @param Search: The method used to search the particle cloud with from each of destination points.
21186 @type SampleCount: int
21187 @param SampleCount: The number of samples to search for and interpolate together to produce the final color.
21188 @rtype: bool
21189 @return: True if the import completed successfully, or False otherwise.
21190 @raise IOError: Raised if the file was invalid; if the file was missing data; if any of the file data was in the wrong format.
21191 @raise TypeError: Raised if the image set dictionary was in the wrong format.
21192 @raise ValueError: Raised if no image sets were supplied; if any of the image sets was invalid; if the image sets belong to different objects; if any of the patch indices was invalid; if any of the patch sizes didn't match between image sets.
21193 """
21194 pass
21195
21197 """Returns a dictionary of user-friendly names to their associated enum value, for all the supported interpolation methods.
21198
21199 @rtype: variant
21200 """
21201 pass
21202
21203 - def rangeUnits(self):
21204 """Returns a dictionary of user-friendly names to their associated enum value, for all the supported search range units.
21205
21206 @rtype: variant
21207 """
21208 pass
21209
21210 - def searchMethods(self):
21211 """Returns a dictionary of user-friendly names to their associated enum value, for all the supported search methods.
21212
21213 @rtype: variant
21214 """
21215 pass
21216
21218 """Returns a list of all the supported particle file formats.
21219
21220 @rtype: list of str
21221 """
21222 pass
21223
21224 - def transferChannel(self, SourceChannel, SourceFrame, SourceUVIndices, DestinationObject, DestinationFrame, DestinationUVIndices, Interpolation, DestinationFlags, SourceGeoVersion=None, DestinationGeoVersion=None, SearchRange=1.0, SearchUnits=RANGE_INFINITE, FillColor=None, Search=SEARCH_RADIAL, SampleCount=16, SourceFlags=EXPORT_MATCH_IMPORT, DestinationSize=ImageSet.SIZE_NULL):
21225 """Copies a single channel from one object to another.
21226
21227 >>> src_geo_entity = mari.geo.get('Head1')
21228 >>> src_channel = src_geo_entity.channel('diffuse')
21229 >>> dst_geo_entity = mari.geo.get('Head2')
21230 >>> mari.particle.transferChannel(src_channel, 0, [], dst_geo_entity, 0, [],
21231 ... mari.particle.INTERPOLATION_INVERSE_DISTANCE_WEIGHTED,
21232 ... mari.particle.IMPORT_BLEED_EDGES | mari.particle.IMPORT_FLATTEN)
21233
21234 @type SourceChannel: L{Channel}
21235 @param SourceChannel: The source channel to read from.
21236 @type SourceFrame: int
21237 @param SourceFrame: The animated frame number to read from.
21238 @type SourceUVIndices: list of int
21239 @param SourceUVIndices: Which patches in the source to read from. Passing in an empty list will cause all source patches to be read from.
21240 @type DestinationObject: L{GeoEntity}
21241 @param DestinationObject: The destination object to write into.
21242 @type DestinationFrame: int
21243 @param DestinationFrame: The animated frame number to write to.
21244 @type DestinationUVIndices: list of int
21245 @param DestinationUVIndices: Which patches in the destination to write to. Passing in an empty list will cause all destination patches to be written to.
21246 @type Interpolation: L{InterpolationMethod}
21247 @param Interpolation: Which method of interpolation to use when calculating the final color value from the closest particles.
21248 @type DestinationFlags: int
21249 @param DestinationFlags: The options used in writing. See L{ImportFlags}.
21250 @type SourceGeoVersion: L{GeoEntityVersion}
21251 @param SourceGeoVersion: The source geometry version to read from. If None then the current geometry version is used.
21252 @type DestinationGeoVersion: L{GeoEntityVersion}
21253 @param DestinationGeoVersion: The destination geometry version to write into. If None then the current geometry version is used.
21254 @type SearchRange: float
21255 @param SearchRange: The maximum distance allowed to be searched.
21256 @type SearchUnits: L{RangeUnits}
21257 @param SearchUnits: The units of measure for the search range.
21258 @type FillColor: L{Color}
21259 @param FillColor: The color used to fill the newly created destination image sets with.
21260 @type Search: L{SearchMethod}
21261 @param Search: The method used to search the particle cloud with from each of destination points.
21262 @type SampleCount: int
21263 @param SampleCount: The number of samples to search for and interpolate together to produce the final color.
21264 @type SourceFlags: int
21265 @param SourceFlags: The options used in reading. See L{ExportFlags}.
21266 @type DestinationSize: L{ImageSet.Size}
21267 @param DestinationSize: Used to specified the image size for all uv indices in the destination channel. If a size is not given then the size will match the source.
21268 @rtype: L{Channel}
21269 @return: A destination channel if the transfer completed successfully, or None otherwise.
21270 @raise ValueError: Raised if no channel was supplied; if any of the patch indices was invalid; if no destination object was supplied.
21271 """
21272 pass
21273
21274 - def transferImageSets(self, SourceImageSets, SourceFrame, SourceUVIndices, DestinationImageSets, DestinationFrame, DestinationUVIndices, Interpolation, DestinationFlags, SourceGeoVersion=None, DestinationGeoVersion=None, SearchRange=1.0, SearchUnits=RANGE_INFINITE, Search=SEARCH_RADIAL, SampleCount=16, SourceFlags=EXPORT_MATCH_IMPORT):
21275 """Copies image data from one image set to another.
21276
21277 The image sets in the source list must belong to the same object and have the same width and height. This also applies to the destination list. >>> src_geo_entity = mari.geo.get('Head1')
21278 >>> src_image_set = src_geo_entity.currentImageSet()
21279 >>> dst_geo_entity = mari.geo.get('Head2')
21280 >>> dst_image_set = dst_geo_entity.currentImageSet()
21281 >>> mari.particle.transferImageSets([src_image_set], 0, [0, 1], [dst_image_set], 0, [0, 1],
21282 ... mari.particle.INTERPOLATION_INVERSE_DISTANCE_WEIGHTED,
21283 ... mari.particle.IMPORT_BLEED_EDGES)
21284
21285 @type SourceImageSets: list of L{ImageSet}
21286 @param SourceImageSets: A list of source image sets to read from.
21287 @type SourceFrame: int
21288 @param SourceFrame: The animated frame number to read from.
21289 @type SourceUVIndices: list of int
21290 @param SourceUVIndices: Which patches in the source to read from. Passing in an empty list will cause all source patches to be read from.
21291 @type DestinationImageSets: list of L{ImageSet}
21292 @param DestinationImageSets: A list of destination image sets to write into.
21293 @type DestinationFrame: int
21294 @param DestinationFrame: The animated frame number to write to.
21295 @type DestinationUVIndices: list of int
21296 @param DestinationUVIndices: Which patches in the destination to write to. Passing in an empty list will cause all destination patches to be written to.
21297 @type Interpolation: L{InterpolationMethod}
21298 @param Interpolation: Which method of interpolation to use when calculating the final color value from the closest particles.
21299 @type DestinationFlags: int
21300 @param DestinationFlags: The options used in writing. See L{ImportFlags}.
21301 @type SourceGeoVersion: L{GeoEntityVersion}
21302 @param SourceGeoVersion: The source geometry version to read from. If None then the current geometry version is used.
21303 @type DestinationGeoVersion: L{GeoEntityVersion}
21304 @param DestinationGeoVersion: The destination geometry version to write into. If None then the current geometry version is used.
21305 @type SearchRange: float
21306 @param SearchRange: The maximum distance allowed to be searched.
21307 @type SearchUnits: L{RangeUnits}
21308 @param SearchUnits: The units of measure for the search range.
21309 @type Search: L{SearchMethod}
21310 @param Search: The method used to search the particle cloud with from each of destination points.
21311 @type SampleCount: int
21312 @param SampleCount: The number of samples to search for and interpolate together to produce the final color.
21313 @type SourceFlags: int
21314 @param SourceFlags: The options used in reading. See L{ExportFlags}.
21315 @rtype: bool
21316 @return: True if the transfer completed successfully, or False otherwise.
21317 @raise ValueError: Raised if no image sets were supplied; the number of source image sets doesn't match the number of destination image sets; if any of the image sets was invalid; if the image sets belong to different objects; if any of the patch indices was invalid; if any of the patch sizes didn't match between image sets.
21318 """
21319 pass
21320
21321 - def transferLayers(self, SourceLayers, SourceFrame, SourceUVIndices, DestinationStack, DestinationFrame, DestinationUVIndices, Interpolation, DestinationFlags, SourceGeoVersion=None, DestinationGeoVersion=None, SearchRange=1.0, SearchUnits=RANGE_INFINITE, FillColor=None, Search=SEARCH_RADIAL, SampleCount=16, SourceFlags=EXPORT_MATCH_IMPORT):
21322 """Copies layers from one object to another.
21323
21324 The layers in the source list must belong to the same object. >>> src_geo_entity = mari.geo.get('Head1')
21325 >>> src_channel = src_geo_entity.channel('diffuse')
21326 >>> src_layer = src_channel.layer('color')
21327 >>> dst_geo_entity = mari.geo.get('Head2')
21328 >>> dst_channel = dst_geo_entity.channel('diffuse')
21329 >>> mari.particle.transferLayers([src_layer], 0, [], dst_channel, 0, [],
21330 ... mari.particle.INTERPOLATION_INVERSE_DISTANCE_WEIGHTED,
21331 ... mari.particle.IMPORT_BLEED_EDGES | mari.particle.IMPORT_FLATTEN)
21332
21333 @type SourceLayers: list of L{Layer}
21334 @param SourceLayers: A list of source layers to read from.
21335 @type SourceFrame: int
21336 @param SourceFrame: The animated frame number to read from.
21337 @type SourceUVIndices: list of int
21338 @param SourceUVIndices: Which patches in the source to read from. Passing in an empty list will cause all source patches to be read from.
21339 @type DestinationStack: L{LayerStack}
21340 @param DestinationStack: The destination layer stack to write into.
21341 @type DestinationFrame: int
21342 @param DestinationFrame: The animated frame number to write to.
21343 @type DestinationUVIndices: list of int
21344 @param DestinationUVIndices: Which patches in the destination to write to. Passing in an empty list will cause all destination patches to be written to.
21345 @type Interpolation: L{InterpolationMethod}
21346 @param Interpolation: Which method of interpolation to use when calculating the final color value from the closest particles.
21347 @type DestinationFlags: int
21348 @param DestinationFlags: The options used in writing. See L{ImportFlags}.
21349 @type SourceGeoVersion: L{GeoEntityVersion}
21350 @param SourceGeoVersion: The source geometry version to read from. If None then the current geometry version is used.
21351 @type DestinationGeoVersion: L{GeoEntityVersion}
21352 @param DestinationGeoVersion: The destination geometry version to write into. If None then the current geometry version is used.
21353 @type SearchRange: float
21354 @param SearchRange: The maximum distance allowed to be searched.
21355 @type SearchUnits: L{RangeUnits}
21356 @param SearchUnits: The units of measure for the search range.
21357 @type FillColor: L{Color}
21358 @param FillColor: The color used to fill the newly created destination image sets with.
21359 @type Search: L{SearchMethod}
21360 @param Search: The method used to search the particle cloud with from each of destination points.
21361 @type SampleCount: int
21362 @param SampleCount: The number of samples to search for and interpolate together to produce the final color.
21363 @type SourceFlags: int
21364 @param SourceFlags: The options used in reading. See L{ExportFlags}.
21365 @rtype: list of L{Layer}
21366 @return: A list of destination layers if the transfer completed successfully, or an empty list otherwise.
21367 @raise ValueError: Raised if no layers were supplied; if any of the layers was invalid; if the layers belong to different objects; if any of the patch indices was invalid; if no destination layer stack was supplied.
21368 """
21369 pass
21370
21373 """A post processing filter that runs custom GLSL code.
21374
21375 L{GLSLFilter} objects can be created by calling L{PostFilterCollection.createGLSL()}.
21376
21377 B{Example Code}
21378
21379 >>> # This examples creates a new GLSLFilter object through GLRender and PostFilterCollection
21380 >>> import mari
21381 >>> filter_collection = mari.gl_render.createPostFilterCollection("New Filter Collection")
21382 >>> glsl_filter = filter_collection.createGLSL("New GLSL Filter")
21383 >>> mari.gl_render.deletePostFilterCollection(filter_collection)
21384
21385 @cvar CLAMP_TO_EDGE: Repeat the edge pixel for out of range values.
21386 @cvar CLAMP_REPEAT: Loop around in texture space, so -0.2 becomes 0.8, 1.2 becomes 0.2, and so on.
21387 @cvar FILTER_LINEAR: L{Filter} the texture using a bilinear filter.
21388 @cvar FILTER_NEAREST: L{Filter} the texture by sampling the value of the nearest pixel.
21389 @cvar FILTER_MIPMAP_LINEAR: Perform a mipmapped linear lookup on the texture.
21390 @cvar FORMAT_RGBA: The texture has 4 components per pixel.
21391 @cvar FORMAT_RGB: The texture has 3 components per pixel.
21392 @cvar FORMAT_R: The texture has 1 component per pixel.
21393 @cvar FORMAT_L: Legacy. The texture has 1 component per pixel. Please use FORMAT_R instead.
21394 @group Signals: enabledChanged
21395 """
21396
21398 """The strategy for handling out-of-range errors.
21399
21400 An out of range error occurs when a value is below 0 or above 1.
21401
21402 @cvar CLAMP_TO_EDGE: Repeat the edge pixel for out of range values.
21403 @cvar CLAMP_REPEAT: Loop around in texture space, so -0.2 becomes 0.8, 1.2 becomes 0.2, and so on.
21404 @note: These values are exposed in the parent class, but are also documented here for convenience.
21405 """
21406 CLAMP_TO_EDGE = 0
21407 CLAMP_REPEAT = 1
21408
21409 CLAMP_TO_EDGE = 0
21410 CLAMP_REPEAT = 1
21411
21413 """Filtering modes that can be selected when performing texture look-ups.
21414 @cvar FILTER_LINEAR: L{Filter} the texture using a bilinear filter.
21415 @cvar FILTER_NEAREST: L{Filter} the texture by sampling the value of the nearest pixel.
21416 @cvar FILTER_MIPMAP_LINEAR: Perform a mipmapped linear lookup on the texture.
21417 @note: These values are exposed in the parent class, but are also documented here for convenience.
21418 """
21419 FILTER_LINEAR = 0
21420 FILTER_NEAREST = 1
21421 FILTER_MIPMAP_LINEAR = 2
21422
21423 FILTER_LINEAR = 0
21424 FILTER_NEAREST = 1
21425 FILTER_MIPMAP_LINEAR = 2
21426
21442
21443 FORMAT_RGBA = 4
21444 FORMAT_RGB = 3
21445 FORMAT_R = 1
21446 FORMAT_L = FORMAT_R
21447
21448 - def bodySnippet(self):
21449 """Returns the body GLSL snippet for the filter.
21450
21451 @rtype: str
21452 @return: Body GLSL snippet.
21453 @see: L{setBodySnippet()}
21454 """
21455 pass
21456
21458 """Returns the definition GLSL snippet for the filter.
21459
21460 @rtype: str
21461 @return: The GLSL shader snippet that defines the functions and uniforms for this post process filter.
21462 @see: L{setDefinitionsSnippet()}
21463 """
21464 pass
21465
21466 - def deleteTexture(self, SamplerName):
21467 """Deletes the texture associated with the given sampler.
21468
21469 This deletes and frees the texture associated with the given sampler. You should do this when replacing the texture with a new one.
21470
21471 @type SamplerName: str
21472 @param SamplerName: The name of the sampler associated with the texture to delete
21473 @rtype: None
21474 """
21475 pass
21476
21478 """This is emitted when the filter is enabled or disabled.
21479
21480 DEPRICATED (3.0v2): This function will be removed in a future version. Please use L{flagsChanged()} instead.
21481
21482 @type Enabled: bool
21483 @rtype: None
21484 """
21485 pass
21486
21487 - def setBodySnippet(self, BodySnippet):
21488 """Sets the body GLSL snippet for the filter.
21489
21490 @type BodySnippet: str
21491 @param BodySnippet: Body GLSL snippet.
21492 @rtype: None
21493 @see: L{bodySnippet()}
21494 """
21495 pass
21496
21498 """Sets the definition GLSL snippet for the filter.
21499
21500 @type DefinitionsSnippet: str
21501 @param DefinitionsSnippet: The GLSL shader snippet that defines the functions and uniforms for this post process filter.
21502 @rtype: None
21503 @see: L{definitionsSnippet()}
21504 """
21505 pass
21506
21507 - def setTexture1D(self, SamplerName, Width, DataFormat, Data, MinFilter=FILTER_LINEAR, MagFilter=FILTER_LINEAR, ClampS=CLAMP_TO_EDGE, ClampT=CLAMP_TO_EDGE):
21508 """Adds a 1D texture for this filter to use.
21509
21510 Post processing filters, such as look up tables (LUTs), need input data to work with. This method makes it possible to provide texture data for use in the filter.
21511
21512 This is not really intended for large images, as upload performance will not be great.
21513
21514 All texture data is assumed to be floating point, and is uploaded unclamped.
21515
21516 @type SamplerName: str
21517 @param SamplerName: The name of the sampler to bind this texture to
21518 @type Width: int
21519 @param Width: The width of the texture in pixels.
21520 @type DataFormat: L{Format}
21521 @param DataFormat: The format of the incoming texture data.
21522 @type Data: list of float
21523 @param Data: A list of floating point values that constitutes the data for the texture. This should contain (L{Width} * components per pixel) entries
21524 @type MinFilter: L{Filter}
21525 @param MinFilter: The filter to use when minifying the texture
21526 @type MagFilter: L{Filter}
21527 @param MagFilter: The filter to use when magnifying the texture
21528 @type ClampS: L{Clamp}
21529 @param ClampS: The method for clamping the texture in the S Direction
21530 @type ClampT: L{Clamp}
21531 @param ClampT: The method for clamping the texture in the T direction
21532 @rtype: None
21533 """
21534 pass
21535
21536 - def setTexture2D(self, SamplerName, Width, Height, DataFormat, Data, MinFilter=FILTER_LINEAR, MagFilter=FILTER_LINEAR, ClampS=CLAMP_TO_EDGE, ClampT=CLAMP_TO_EDGE):
21537 """Adds a 2D texture for this filter to use.
21538
21539 Post processing filters, such as look up tables (LUTs), need input data to work with. This method makes it possible to provide texture data for use in the filter.
21540
21541 This is not really intended for large images, as upload performance will not be great.
21542
21543 All texture data is assumed to be floating point, and is uploaded unclamped.
21544
21545 @type SamplerName: str
21546 @param SamplerName: The name of the sampler to bind this texture to
21547 @type Width: int
21548 @param Width: The width of the texture in pixels
21549 @type Height: int
21550 @param Height: The height of the texture in pixels
21551 @type DataFormat: L{Format}
21552 @param DataFormat: The format of the incoming texture data
21553 @type Data: list of float
21554 @param Data: A list of floating point values that constitutes the data for the texture. This should contain (L{Width} * L{Height} * components per pixel) entries
21555 @type MinFilter: L{Filter}
21556 @param MinFilter: The filter to use when minifying the texture
21557 @type MagFilter: L{Filter}
21558 @param MagFilter: The filter to use when magnifying the texture
21559 @type ClampS: L{Clamp}
21560 @param ClampS: The method for clamping the texture in the S Direction
21561 @type ClampT: L{Clamp}
21562 @param ClampT: The method for clamping the texture in the T direction
21563 @rtype: None
21564 """
21565 pass
21566
21567 - def setTexture3D(self, SamplerName, Width, Height, Depth, DataFormat, Data, MinFilter=FILTER_LINEAR, MagFilter=FILTER_LINEAR, ClampS=CLAMP_TO_EDGE, ClampT=CLAMP_TO_EDGE, ClampR=CLAMP_TO_EDGE):
21568 """Adds a 3D texture for this filter to use.
21569
21570 Post processing filters, such as look up tables (LUTs), need input data to work with. This method makes it possible to provide texture data for use in the filter.
21571
21572 This is not really intended for large images, as upload performance will not be great.
21573
21574 All texture data is assumed to be floating point, and is uploaded unclamped.
21575
21576 @type SamplerName: str
21577 @param SamplerName: The name of the sampler to bind this texture to
21578 @type Width: int
21579 @param Width: The width of the texture in pixels
21580 @type Height: int
21581 @param Height: The height of the texture in pixels
21582 @type Depth: int
21583 @param Depth: The height of the texture in pixels
21584 @type DataFormat: L{Format}
21585 @param DataFormat: The format of the incoming texture data.
21586 @type Data: list of float
21587 @param Data: A list of floating point values that constitutes the data for the texture. This should contain (L{Width} * L{Height} * L{Depth} * components per pixel) entries
21588 @type MinFilter: L{Filter}
21589 @param MinFilter: The filter to use when minifying the texture
21590 @type MagFilter: L{Filter}
21591 @param MagFilter: The filter to use when magnifying the texture
21592 @type ClampS: L{Clamp}
21593 @param ClampS: The method for clamping the texture in the S Direction
21594 @type ClampT: L{Clamp}
21595 @param ClampT: The method for clamping the texture in the T direction
21596 @type ClampR: L{Clamp}
21597 @param ClampR: The method for clamping the texture in the R direction
21598 @rtype: None
21599 """
21600 pass
21601
21602 - def updateTexture1D(self, SamplerName, Data):
21603 """Updates an existing 1D texture.
21604
21605 This is similar to a glTexSubImage1D call.
21606
21607 @type SamplerName: str
21608 @param SamplerName: The name of the sampler to bind this texture to. This must already have a texture bound using setTexture2D
21609 @type Data: list of float
21610 @param Data: A list of floating point values that constitutes the data for the texture. This should contain (width * components per pixel) entries
21611 @rtype: None
21612 @raise ValueError: Raised if Data does not contain the correct number of entries, or another parameter is incorrect.
21613 @note: The width and format of the texture update must be the same as the texture set with setTexture1D. If Data does not contain the correct number of samples, this function will raise an exception.
21614 """
21615 pass
21616
21617 - def updateTexture2D(self, SamplerName, Data):
21618 """Updates an existing 2D texture.
21619
21620 This is similar to a glTexSubImage2D call.
21621
21622 @type SamplerName: str
21623 @param SamplerName: The name of the sampler to bind this texture to. This must already have a texture bound using setTexture2D
21624 @type Data: list of float
21625 @param Data: A list of floating point values that constitutes the data for the texture. This should contain (width * height * components per pixel) entries
21626 @rtype: None
21627 @raise ValueError: Raised if Data does not contain the correct number of entries, or another parameter is incorrect.
21628 @note: The width, height, and format of the texture update must be the same as the texture set with setTexture2D. If Data does not contain the correct number of samples, this function will raise an exception.
21629 """
21630 pass
21631
21632 - def updateTexture3D(self, SamplerName, Data):
21633 """Updates an existing 3D texture.
21634
21635 This is similar to a glTexSubImage3D call.
21636
21637 @type SamplerName: str
21638 @param SamplerName: The name of the sampler to bind this texture to. This must already have a texture bound using setTexture3D
21639 @type Data: list of float
21640 @param Data: A list of floating point values that constitutes the data for the texture. This should contain (width * height * depth * components per pixel) entries
21641 @rtype: None
21642 @raise ValueError: Raised if Data does not contain the correct number of entries, or another parameter is incorrect.
21643 @note: The width, height, depth, and format of the texture update must be the same as the texture set with setTexture3D. If Data does not contain the correct number of samples, this function will raise an exception.
21644 """
21645 pass
21646
21649 """Paintable layers contain an image for each patch that can be painted directly.
21650
21651 You can access all types of layers from their containing L{Channel} objects - for example: C{channel.layerList()}
21652
21653 You can check for L{PaintableLayer} objects by calling L{Layer.isPaintableLayer()}:
21654
21655 >>> # This examples creates a paintable layer and checks if it's a paintable layer
21656 >>> import mari
21657 >>> channel = mari.geo.current().currentChannel()
21658 >>> layer = channel.createPaintableLayer("Test")
21659 >>> layer.isPaintableLayer()
21660 True
21661 """
21662
21664 """Returns True if the layer has Texture Bleed enabled.
21665
21666 @rtype: bool
21667 @return: Return a Boolean
21668 @see: L{setBleed()}
21669 """
21670 pass
21671
21673 """Exports a set of images from the layer.
21674
21675 This is the same as selecting "Export Selected Layers" from the GUI with only the given layer selected. To export the entire layer stack, call L{LayerStack.exportImages()}.
21676
21677 Pass in the path and template to export the files to - for example:
21678
21679 >>> import mari
21680 >>> layer = mari.geo.current().currentChannel().currentLayer()
21681 >>> layer.exportImages('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
21682
21683 Only paintable and procedural layers can be exported individually in this way.
21684
21685 @type PathAndTemplate: str
21686 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
21687 @type Options: int
21688 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
21689 @type UVIndexList: list of int
21690 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
21691 @rtype: None
21692 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
21693 @raise IOError: Raised if an error occurred with the export process.
21694 @see: L{ProceduralLayer.exportImages()}, L{LayerStack.exportImages()}, L{importImages()}
21695 """
21696 pass
21697
21699 """Exports images for the selected patches from this layer.
21700
21701 Pass in the path and template to export the files to - for example:
21702
21703 >>> layer.exportSelectedPatches('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
21704
21705 Only paintable and procedural layers can be exported individually in this way.
21706
21707 @type PathAndTemplate: str
21708 @param PathAndTemplate: The target path for the export and the template to export the files to, in a single string.
21709 @type Options: int
21710 @param Options: Pass in a value other than the default to turn on an option, such as disabling "small uniforms". See L{Image.SaveOptions}.
21711 @rtype: None
21712 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
21713 @raise IOError: Raised if an error occurred with the export process.
21714 @see: L{ProceduralLayer.exportImages()}, L{LayerStack.exportImages()}, L{importImages()}
21715 """
21716 pass
21717
21719 """Returns the image set used by this layer.
21720
21721 @rtype: L{ImageSet}
21722 @return: Return an image set.
21723 @raise SystemError: Raised if the layers paint image set cannot be found.
21724 """
21725 pass
21726
21728 """Imports a set of images into the layer.
21729
21730 This is the same as selecting "Import into Layer" from the GUI. To import into a layer stack, call L{LayerStack.importImages()}.
21731
21732 Pass in the path to the files and the template to import them from - for example:
21733
21734 >>> layer.importImages('/tmp/$CHANNEL.$LAYER.$UDIM.tif')
21735
21736 @type PathAndTemplate: str
21737 @param PathAndTemplate: The path to the files and the template to import them from, in a single string
21738 @type ScaleOption: L{ImageSet.ScaleChoice}
21739 @param ScaleOption: When the existing patch and the image in the file to import are of different sizes, this indicates which of the two to rescale to match the other
21740 @type UVIndexList: list of int
21741 @param UVIndexList: Pass in a list of zero-based UV indices if desired to specify the patches to export images for. If not specified or empty, images will be exported for all indices. The UDIM for a patch is the zero-based UV index plus 1001.
21742 @type RemoveAlpha: bool
21743 @param RemoveAlpha: Remove the alpha channel (convert RGBA to RGB).
21744 @rtype: None
21745 @raise ValueError: Raised if the path and template parameter was empty, or if an invalid UV index was specified.
21746 @raise IOError: Raised if an error occurred with the import process.
21747 @see: L{ProceduralLayer.exportImages()}, L{LayerStack.importImages()}, L{exportImages()}
21748 """
21749 pass
21750
21752 """Sets the Texture Bleed for this layer.
21753
21754 @type bleed: bool
21755 @param bleed: The new L{bleed} value
21756 @rtype: None
21757 @see: L{bleed()}
21758 """
21759 pass
21760
21761
21762 import utils
21763 import system
21764 import examples
21765